Skip to Content

At-selection-screen modification

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.

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

6 Answers

  • Best Answer
    author's profile photo Former Member
    Former Member
    Posted on Oct 01, 2009 at 09:02 AM

    Hi,

    Try this.

    SELECTION-SCREEN: BEGIN OF LINE.
    SELECTION-SCREEN COMMENT 1(30) TEXT-005.
    SELECTION-SCREEN: POSITION 32.
    PARAMETER:P_SH TYPE C RADIOBUTTON GROUP RG USER-COMMAND CMD DEFAULT 'X'.                "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.
    
    
    AT SELECTION-SCREEN OUTPUT.
    
      LOOP AT SCREEN.
    
        IF ( P_SH EQ 'X' AND SCREEN-GROUP1 EQ 'GP5' ) .
          SCREEN-INPUT = 1.
          MODIFY SCREEN.
        ELSEIF ( P_SH EQ 'X' AND SCREEN-GROUP1 EQ 'GP6' ).
          SCREEN-INPUT = 0.
          MODIFY SCREEN.
        ELSEIF ( P_SI EQ 'X' AND SCREEN-GROUP1 EQ 'GP6' ).
          SCREEN-INPUT = 1.
          MODIFY SCREEN.
        ELSEIF ( P_SI EQ 'X' AND SCREEN-GROUP1 EQ 'GP5' ).
          SCREEN-INPUT = 1.
          MODIFY SCREEN.
        ENDIF.
      ENDLOOP.

    Thanks & Regards

    Rahul

    Add a comment
    10|10000 characters needed characters exceeded

    • Former Member Sunil Kumar kairamkonda

      >

      > Here first 1 have 3 radio buttions if any one is check the field p_kunnr should be input ready and fields p_vbeln and p_posnr should be not ready for input.

      >

      > when i check the radio button p_sh (header) only p_vbeln should be input ready and fields p_kunnr and p_posnr should be disabled.

      >

      > when i check radio buttion p_si (item) field p_vbeln & p_posnr should be ready for input and p_kunnr should be not be activ

      .

      As i understand, u mean this:

      at selection-screen output.
        LOOP AT SCREEN.
          screen-input = 0.
          case screen-group1.
            when 'GP1'.
              if p_ct eq 'X' or p_cp eq 'X' or p_sd eq 'X'.
                screen-input = 1.
              endif.
            when 'GP5'.
              if p_si eq 'X' or p_sh eq 'X'.
                screen-input = 1.
              endif.
            when 'GP6'.
              if p_si eq 'X'.
                screen-input = 1.
              endif.
            when others.
              continue.
          endcase.
          MODIFY SCREEN.
        ENDLOOP.

  • author's profile photo Former Member
    Former Member
    Posted on Oct 01, 2009 at 08:03 AM

    Hi, Sunil!

    At first u should define first radio button with user-command key word to activate PAI (and of course PBO then) event.

    parameter:p_sh type c radiobutton group rg user-command radio_fcode.

    Then just describe PBO event.

    at selection-screen output.
      LOOP AT SCREEN.
        check screen-GROUP1 eq 'GP6'.
        if p_si eq 'X'.
          screen-input = 1.
        else.
          screen-input = 0.
        endif.
        MODIFY SCREEN.
      ENDLOOP.

    have a good luck!

    Peter Plenkov

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Oct 01, 2009 at 10:13 AM

    HI SUNIL ,

    IF YOU HAVE 2 RADIO BUTTONS I THINK IT IS NOT POSSIBLE

    ONE SHOULD BE DEFAULT.

    REGARDS

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Oct 01, 2009 at 10:26 AM

    HI SUNIL ,

    CHECK THIS

    SELECTION-SCREEN: BEGIN OF LINE.

    SELECTION-SCREEN: POSITION 32.

    PARAMETER:P_SH2 TYPE C RADIOBUTTON GROUP RG USER-COMMAND CMD DEFAULT 'X'. "Sales Item

    SELECTION-SCREEN: COMMENT 35(15) FOR FIELD P_SH2. "Sales Document Item

    SELECTION-SCREEN: END OF LINE.

    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.

    AT SELECTION-SCREEN OUTPUT.

    LOOP AT SCREEN.

    IF ( P_SH EQ 'X' AND SCREEN-GROUP1 EQ 'GP5' ) .

    SCREEN-INPUT = 1.

    MODIFY SCREEN.

    ELSEIF ( P_SH EQ 'X' AND SCREEN-GROUP1 EQ 'GP6' ).

    SCREEN-INPUT = 0.

    MODIFY SCREEN.

    ELSEIF ( P_SI EQ 'X' AND SCREEN-GROUP1 EQ 'GP6' ).

    SCREEN-INPUT = 1.

    MODIFY SCREEN.

    ELSEIF ( P_SI EQ 'X' AND SCREEN-GROUP1 EQ 'GP5' ).

    SCREEN-INPUT = 1.

    MODIFY SCREEN.

    ELSEIF ( P_SH2 EQ 'X' AND SCREEN-GROUP1 EQ 'GP5' OR SCREEN-GROUP1 EQ 'GP6' ).

    SCREEN-INPUT = 0.

    MODIFY SCREEN.

    ENDIF.

    ENDLOOP.

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Oct 01, 2009 at 08:07 AM

    removed...

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Oct 01, 2009 at 09:08 AM

    HI SUNIL,

    USE THIS ITS WORKING FINE

    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.

    AT SELECTION-SCREEN OUTPUT.

    LOOP AT SCREEN.

    IF ( P_SH EQ 'X' AND SCREEN-GROUP1 EQ 'GP5' ) .

    SCREEN-INPUT = 1.

    MODIFY SCREEN.

    ELSEIF ( P_SH EQ 'X' AND SCREEN-GROUP1 EQ 'GP6' ).

    SCREEN-INPUT = 0.

    MODIFY SCREEN.

    ELSEIF ( P_SI EQ 'X' AND SCREEN-GROUP1 EQ 'GP6' AND SCREEN-GROUP1 EQ 'GP5').

    SCREEN-INPUT = 1.

    MODIFY SCREEN.

    ENDIF.

    ENDLOOP.

    REGARDS

    RAVI

    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.