Skip to Content
0
Former Member
Apr 09, 2010 at 10:04 AM

User_command - Link ALV o/p with ME33K

260 Views

Good day Friends,

I have to link my ALV o/p with ME23N OR ME53N OR ME33K according to user Selection ( Purchase Order, Purchase Requistion or Outline agreement)

For ME23N & ME53N it's working successfully.

For ME33K - It's linking with the o/p but not acception the i/p value.

(Ex. I am clicking on ouline agreement value 25000013 or any other value, but it always shows the ME33K screen of outline agreement no. 25000025)

Giving you the code for Reference ---

In debugging for rs_selfield-value is giving the value as selected value (required value).

I am unable to get where it get changed.

FORM user_command USING r_ucomm LIKE sy-ucomm
                        rs_selfield TYPE slis_selfield.

  READ TABLE it_final INDEX rs_selfield-tabindex.
  CASE r_ucomm.
    WHEN '&IC1'.   " Hotspot
      IF rs_selfield-fieldname EQ 'BANFN' AND
         rs_selfield-value EQ it_final-banfn.
        IF rs_selfield-value IS NOT INITIAL.
          SET PARAMETER ID : 'BAN' FIELD rs_selfield-value.
          CALL TRANSACTION 'ME53N' AND SKIP FIRST SCREEN.
        ENDIF.

      ELSEIF rs_selfield-fieldname EQ 'KONNR' AND
         rs_selfield-value EQ it_final-konnr.
        IF rs_selfield-value IS NOT INITIAL.                           
          SET PARAMETER ID : 'VRT' FIELD rs_selfield-value.   " Here Value is Correct in debugging
          CALL TRANSACTION 'ME33K' AND SKIP FIRST SCREEN.
        ENDIF.
      ELSEIF rs_selfield-fieldname EQ 'EBELN' AND
         rs_selfield-value EQ it_final-ebeln.
        IF rs_selfield-value IS NOT INITIAL.
          SET PARAMETER ID : 'BES' FIELD rs_selfield-value.
          CALL TRANSACTION 'ME23N' AND SKIP FIRST SCREEN.
        ENDIF.
      ENDIF.

    WHEN OTHERS.
  ENDCASE.
  CLEAR: it_final.


ENDFORM.                    "USER_COMMAND