Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

selection screen

Former Member
0 Likes
550

Hi folks

i defiend selection screen

SELECTION-SCREEN BEGIN OF BLOCK 1 WITH FRAME TITLE TEXT-001.

PARAMETERS: CCOD1 LIKE ZDESKDLC-CCODE MODIF ID DEF,

DESKCD LIKE ZDESKDLC-DESK_CODE MODIF ID DEF,

SR_MANAG LIKE ZDESKDLC-SR_MANAGEMENT MODIF ID DEF,

LASTNAME LIKE ZDESKDLC-LAST_NAME MODIF ID DEF,

FIRSTNM LIKE ZDESKDLC-FIRST_NAME MODIF ID DEF,

DEPART LIKE ZDESKDLC-DEPARTMENT MODIF ID DEF,

SELECTION-SCREEN END OF BLOCK1.

my requerement is

if uesr enter values in CCOD1 ,DESKCD then the remaining values should atomatically populate to selection screen.

could please explain me in detail how can i write the code for it?

regards

neeru

6 REPLIES 6
Read only

Former Member
0 Likes
508

try in the event : AT SELECTION-SCREEN.

e.g.

AT SELECTION-SCREEN.

<check if CCOD1 and DESKCD are filled, then insert the values in the remaining parameters>

Please reward the helpful entries.

Regards,

Raman.

Read only

Former Member
0 Likes
508

Hi Reeru,

In At Selection Screen event, you have to check CCOD1 and DESKCD values.

if they are not initial then explicitly update the other selection screen fields.

AT SELECTION-SCREEN OUTPUT.

check if CCOD1 and DESKCD are not initial then update other selection screen fields.

Ali

Read only

Former Member
0 Likes
508

AT SELECTION-SCREEN OUTPUT.

LOOP AT SCREEN .

IF CCOD1 IS NOT INITIAL AND DESKCD IS NOT INITIAL.

<b>RS_REFRESH_FROM_SELECTOPTIONS</b>

use to read the values from selection screen

Sometimes it happens to print the current selection screen element contents along with the list. For this purpose, we can make use of the function module RS_REFRESH_FROM_SELECTOPTIONS. This function module will retrieve the selection screen elements and its current values. Looping through the output table, we can print the values on the list.

<b>SELECT * LOGIC FOR ALL VALUES FROM DATABASE TABLE</b>

SR_MANAG = value

Like give other values also

MODIFY SCREEN.

ENDIF.

ENDLOOP.

Rewards if useful.................

Minal

Read only

Former Member
0 Likes
508

Hi Neeru,

AT SELECTION-SCREEN OUTPUT.

LOOP AT SCREEN .

IF CCOD1 IS NOT INITIAL AND DESKCD IS NOT INITIAL.

    • coding to populate other values

MODIFY SCREEN.

ENDIF.

ENDLOOP.

Rewards if Useful.

Regards,

Chitra

Read only

Former Member
0 Likes
508

try out this sample prog: ( you can apply the same logic in your case )

TABLES: mara, makt.

PARAMETERS: matnr LIKE mara-matnr MODIF ID DEF,

maktx LIKE makt-maktx MODIF ID DEF,

spras LIKE makt-spras MODIF ID DEF.

AT SELECTION-SCREEN.

if ( not matnr is INITIAL ) and ( not maktx is initial ).

spras = 'x'.

ENDIF.

Please reward the helpful entries.

Regards,

Raman.

Read only

harimanjesh_an
Active Participant
0 Likes
508

Hi neeru,

For this you need to create a Search help in SE11 that EXPORTS these six values i.e., CCOD1, DESKCD, SR_MANAG, LASTNAME, FIRSTNM, DEPART .

And then Create a structure in SE11 which will have these six fields, and in SE11 you should assign your search help to the structure and MAP your search help EXPORT parameters to your Structure fields.

After doing this use this strcutre to create your selection-screen fields.

SELECTION-SCREEN BEGIN OF BLOCK 1 WITH FRAME TITLE TEXT-001.

<b>PARAMETER: fld1 like struct-fld1,

fld2 like struct-fld2,

.

.

fld6 like struct-fld6. </b>

SELECTION-SCREEN END OF BLOCK1.

Here struct is the structure that you create and where you assign your search help to structure.

And then when u execute ur program and press F4 on field that you had mapped ur search help in the structure.... then it will auto populate all ur remaining 5 parameters....

To create search help..... check this link....

http://help.sap.com/saphelp_nw04/helpdata/en/9f/dbaa5435c111d1829f0000e829fbfe/content.htm

To create elementary search help.....

http://help.sap.com/saphelp_nw04/helpdata/en/cf/21ee38446011d189700000e8322d00/frameset.htm

All the best.....

<b>if it does not work then i have another method..... u can reply me.... i will tell u the other method also.....</b>

reward me if it is useful......

with regards.......