Skip to Content
0
Oct 01, 2009 at 07:37 AM

At-selection-screen modification

24 Views

Hi Experts,

I am doing the selection screen modification. The selection screen is designed such as i have two radio buttons 1. header & 2. Item anb beside header radio button i have field sales document number and beside item radio button sales item number field.

SELECTION-SCREEN: BEGIN OF LINE.
SELECTION-SCREEN COMMENT 1(30) text-005.
SELECTION-SCREEN: position 32.
parameter:p_sh type c radiobutton group rg.                "Sales header
selection-screen: comment 35(15) for field p_sh.
selection-screen: comment 60(20) for field p_vbeln.
parameter:p_vbeln like vbak-vbeln MODIF ID gp5.            "Sales Document
SELECTION-SCREEN: END OF LINE.

SELECTION-SCREEN: BEGIN OF LINE.
SELECTION-SCREEN: position 32.
parameter:p_si type c radiobutton group rg.                "Sales Item
selection-screen: comment 35(15) for field p_si.
selection-screen: comment 60(20) for field p_posnr.
parameter:p_posnr like vbap-posnr MODIF ID gp6.            "Sales Document Item
SELECTION-SCREEN: END OF LINE.
SELECTION-SCREEN: skip.

This is the selection screen code where for sales document i have assiged Modif id GP5 for Item Modif id GP6. so when i check radio button p_sh ( header ) then sales document ( p_vbeln) shoudl be active for input .

if i check p_si (item) then both saleds document (p_vbeln) and p_posnr both have different group names i.e GP5 & GP6 should be active. i.e screen-inpu = 1.

I have written the following code for header but for item i am unable to make screen-input = 1 for two different groups. how to do that?

 LOOP AT SCREEN.

    IF ( P_SH NE 'X' AND SCREEN-GROUP1 EQ 'GP5' ) OR
       ( P_SI NE 'X' AND SCREEN-GROUP1 EQ 'GP6' ).

      screen-input = 0.
      MODIFY SCREEN.
      ENDIF.
    ENDLOOP. 

This code is working when i click header radio button but for when i click item radio button (p_si) only item field is active i am unable to make sales docuemnt active at same time. please help me in this regard.

Regards,

sunil kairam.