Application Development 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: 

Description/text beside Select-options

srivijay_dinnimath
Active Participant
0 Kudos

Hi,

My requirement is to print Organization unit text(ORGTX) after/beside seletion screen of Org. unit(ORGEH). i.e. after selecting ORGEH from F4 help the description of ORGEH should be print beside.

please let me know the any solution for this.

Thanks in advance.

Regards,

Srivijay

1 ACCEPTED SOLUTION

rdiger_plantiko2
Active Contributor
0 Kudos

1.) Create an auxiliary DDIC structure, say ZZORGEH, with two components: ORGEH of type ORGEH and ORGTX of type ORGTX. Activate it.

2.) Double-click on the component ORGEH and choose "value help for field (F7)". Enter the search method (search help). For example, for ORGEH there is a search help H_T527X.

A binding proposal will be automatically generated, which binds the structure fields to the F4 fields. It should mention an assignment for ORGEH and ORGTX in your case. Confirm by hitting enter. Activate the structure.

Now you can program your report. In the simplest form, you may write

REPORT  ZZ_TEST_ORGEH.

parameter: p_org type zzorgeh-orgeh.
parameter: p_orgtx type zzorgeh-orgtx.

When you call the report, F4 is offered for p_org. After having selected a value, observe that the value is picked into the field p_org, and the associated text is transferred into p_orgtx automatically.

The rest is styling the selection-screen: Set the parameter on read-only, and put them both in one line:

report  zz_test_orgeh.

selection-screen begin of line.
parameters: p_org type zzorgeh-orgeh.
parameters: p_orgtx type zzorgeh-orgtx.
selection-screen end of line.

at selection-screen output.
   loop at screen.
     if screen-name eq 'P_ORGTX'.
       screen-input = 0.
       modify screen.
     endif.
   endloop.

Regards,

Rüdiger

3 REPLIES 3

rdiger_plantiko2
Active Contributor
0 Kudos

1.) Create an auxiliary DDIC structure, say ZZORGEH, with two components: ORGEH of type ORGEH and ORGTX of type ORGTX. Activate it.

2.) Double-click on the component ORGEH and choose "value help for field (F7)". Enter the search method (search help). For example, for ORGEH there is a search help H_T527X.

A binding proposal will be automatically generated, which binds the structure fields to the F4 fields. It should mention an assignment for ORGEH and ORGTX in your case. Confirm by hitting enter. Activate the structure.

Now you can program your report. In the simplest form, you may write

REPORT  ZZ_TEST_ORGEH.

parameter: p_org type zzorgeh-orgeh.
parameter: p_orgtx type zzorgeh-orgtx.

When you call the report, F4 is offered for p_org. After having selected a value, observe that the value is picked into the field p_org, and the associated text is transferred into p_orgtx automatically.

The rest is styling the selection-screen: Set the parameter on read-only, and put them both in one line:

report  zz_test_orgeh.

selection-screen begin of line.
parameters: p_org type zzorgeh-orgeh.
parameters: p_orgtx type zzorgeh-orgtx.
selection-screen end of line.

at selection-screen output.
   loop at screen.
     if screen-name eq 'P_ORGTX'.
       screen-input = 0.
       modify screen.
     endif.
   endloop.

Regards,

Rüdiger

0 Kudos

Thank you very much Rüdiger for quick reply 🙂

Its working fine. Still I need a little confirmation, here for this code I am not able to see the input text i.e. p_org even though I maintain text in selection texts.

Regards,

Srivijay

0 Kudos

Ah. No problem. If you are in a line with "SELECTION SCREEN BEGIN OF LINE" and with several inputs, then there is no automatic rendering of the field text. You can add it with a SELECTION-SCREEN COMMENT statement.

Cheers,

Rüdiger

report  zz_test_orgeh.

selection-screen begin of line.
selection-screen comment 1(30) for field p_org.
parameters: p_org type zzorgeh-orgeh.
parameters: p_orgtx type zzorgeh-orgtx.
selection-screen end of line.

at selection-screen output.
   loop at screen.
     if screen-name eq 'P_ORGTX'.
       screen-input = 0.
       modify screen.
     endif.
   endloop.