Skip to Content
avatar image
Former Member

USER COMMAND in ALV

Hi friends,

Iam using At user command in ALV.. When iam double click its going to show the transaction Display.(example Invoice Number its showing Invoice Transaction).

But My requirement is i want double click on MBLNR(Material Document Number) Transaction Is MB03.. But I have to Pass the year also..

How i have tio give the input as year also..If i double click MBLNR..its should show the MB03 display Screen....

regards,

sampath

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

4 Answers

  • avatar image
    Former Member
    Aug 22, 2007 at 09:30 AM

    Hi,

    Create a small recording of only the intital screen using SHDB transaction. Then pass this BDC table to CALL TRANSACTION (chk syntax for more details) and call in foreground mode. Here in the recording you will have to populate the MBLNR and YEAR.

    I am assuming you have access to the YEAR in the ALV.

    Thanks..

    Preetham S

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Aug 22, 2007 at 09:30 AM

    following code may help

    DATA: BDCDATA TYPE TABLE OF BDCDATA.

    DATA: ITAB TYPE TABLE OF BDCMSGCOLL.

    DATA: PROGRAM LIKE SY-REPID,

    WA_BDCDATA TYPE BDCDATA.

    WA_BDCDATA-PROGRAM = 'SAPMS38M'.

    WA_BDCDATA-DYNPRO = '0100'.

    WA_BDCDATA-DYNBEGIN = 'X'.

    APPEND WA_BDCDATA TO BDCDATA.

    CLEAR WA_BDCDATA.

    WA_BDCDATA-FNAM = 'RS38M-PROGRAMM'.

    WA_BDCDATA-FVAL = PROGRAM.

    APPEND WA_BDCDATA TO BDCDATA.

    ...

    CALL TRANSACTION 'SE38' USING BDCDATA MODE 'N'

    MESSAGES INTO ITAB.

    reward if useful

    S@meer

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Aug 22, 2007 at 09:30 AM

    Hi sampathkumar,

    1. Simple

    2. Use PARAMETER ID (both for document number and YEAR).

    3. like this.

    SET PARAMETER ID 'MBN' FIELD '1234'.

    SET PARAMETER ID 'MJA' FIELD '2007'.

    CALL TRANSACTION 'MB03'

    AND SKIP FIRST SCREEN.

    Where 1234 = the document number

    2007 = year

    regards,

    amit m.

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Aug 22, 2007 at 09:35 AM

    hi

    if u have the doc yr also displayed then i think u can go for chk boxes...

    if that chk box is checked then u can pass those values from that internal table to the transation.....

    hope iam clear...if any issue revert back

    Add comment
    10|10000 characters needed characters exceeded