We have added search box. Key in SAP issue keyword to search
TopBottom

Announcement: wanna exchange links? contact me at sapchatroom@gmail.com.

RE: [sap-abap] Call subscreen of selection screen on validation error

Posted by Admin at
Share this post:
Ma.gnolia DiggIt! Del.icio.us Yahoo Furl Technorati Reddit

Posted by TerryB (Sr. SAP Developer)
on Aug 1 at 5:01 PM
Mike,
I have never done exactly what you are trying to do, but here's an example of a tabbed selection screen where I manipulated the currently-displayed tab:

SELECTION-SCREEN BEGIN OF TABBED BLOCK tabb1 FOR 10 LINES.
SELECTION-SCREEN TAB (11) tabs1 USER-COMMAND tabs1
DEFAULT SCREEN 1010.
*SELECTION-SCREEN TAB (11) tabs2 USER-COMMAND tabs2
* DEFAULT SCREEN 1020. "R3DK907880
SELECTION-SCREEN TAB (11) tabs3 USER-COMMAND tabs3
DEFAULT SCREEN 1030.
SELECTION-SCREEN TAB (12) tabs4 USER-COMMAND tabs4
DEFAULT SCREEN 1040.
SELECTION-SCREEN END OF BLOCK tabb1.

AT SELECTION-SCREEN OUTPUT.
* Note: The selection screen loses track of which tab it was on upon
* returning from a called transaction. This import/export mess is to
* help it remember.
IMPORT s_tabb1 FROM MEMORY.
IF NOT s_tabb1 IS INITIAL.
tabb1 = s_tabb1.
ENDIF.

I did this a very long time ago, so the exact details are bit murky, but it appears from this code that assigning a tab name (not the screen number) to the tabbed block name serves to make that tab the currently-displayed tab.

Hope that helps,
Terry

---------------Original Message---------------
From: Mike Hammond
Sent: Friday, July 29, 2011 12:05 PM
Subject: Call subscreen of selection screen on validation error

Hi Experts,

I have a requirement to create an executable program (not Module Pool) that uploads a file and using the data in the file, in combination with the selection screen and tvarvc entries, to create material master records, asset records, equipment records, and finally a PO. This will all be accomplished via standard BAPI's and I have no issue there.

Since I cannot truly do a test run, as each bapi call would need a commit prior to the next bapi call, I will be performing comprehensive validation of every selection screen and file field. Additionally, since there are an extensive amount of selection screen fields, I have broken them logically into 3 subscreens in a tab strip on the selection screen.

What I would like to be able to do is if an error is found in the at-selection-screen event, to throw an error message and bring the corresponding tab to the front, so that the user can clearly see the field that needs to be corrected. Our users are new to SAP, so we are trying to make it easy on them.

Does anyone know if this is possible? I have tried call screen 'nnnn' which give a short dump, call selection-screen 'nnnn' where nnnn = subscreen number, which also gives a short dump. I have been able to use call selection-screen 1000 (main sceen) and change the tab strip values to correspond to the tab I want to call (in the selection-screen output event, but this gives inconsistent results.

Sorry for the book, but wanted to make my requirement (okay, desire) clear. Does anyone know if this functionality is possible and could steer me in the right direction?

Much thanks,
Mike

__.____._
Copyright © 2011 Toolbox.com and message author.

Toolbox.com 4343 N. Scottsdale Road Suite 280, Scottsdale, AZ 85251
Mark as helpful
View this online
  
TerryB
SAP ABAP Helper

Posted helpful replies on 5 threads in a group to earn a Bronze Achievement
Popular White Papers

In the Spotlight
Which response to your Toolbox.com Groups post was the most helpful? Use 'Best Answer' to mark highest quality content.
_.____.__

0 comments:

Post a Comment

T r a n s l a t e to your language