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: 

how to bring control from standard t-code back to alv list ?

Former Member
0 Kudos

Hi Expert,

i am facing a problem in alv list ,

Requirement : The out put is generated by " Reuse_alv_list_display" and i cannot change

this FM. user want to click on particular line of the list and display that data in standard t-code

for example: user click on material no on output list and that take the control to  t-code mm03 (basic view)

this is done easily.,

now from mm03 , i want to bring control back to list out put , how can i achieve that ?

waiting response ASAP.

With Thanks & Regards,

Vikas

22 REPLIES 22

Former Member
0 Kudos

Hi Vikas

Only need click 'Back' button from MM03, it will return alv list.

regards,

Archer

0 Kudos

hi Dengyong,

thanks for early reply,

it might possible in mm03 , by click back and control go to alv list. its taken as example

now the actual t-code is ls26 , i want to achive in this t-code , how can i do that?

regards,

vikas

0 Kudos

one more thing i want to add the sap version is 40B...so kindly suggest accordingly..

thanks

regards

vikas

0 Kudos

Hi Vikas,

You can use the same parameter id with material as 'MAT'. Just change the TCODE as LS26.

Maybe you need to add another set parameter with warehouse number above.

set parameter id 'LGN' field v_warehouse_no.

Thanks,

Yawa

Former Member
0 Kudos

Hi Vikas,

Please refer to below steps.

1. create Event.

CALL FUNCTION 'REUSE_ALV_EVENTS_GET'
   EXPORTING
     I_LIST_TYPE           = 0
   IMPORTING
     ET_EVENTS             = V_EVENTS
EXCEPTIONS
  LIST_TYPE_WRONG       = 1
  OTHERS                = 2            .

IF SY-SUBRC <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
   WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.

2. populate event data.

READ TABLE V_EVENTS INTO WA_EVENT WITH KEY NAME = 'USER_COMMAND'.

  IF SY-SUBRC EQ 0.

    WA_EVENT-FORM = 'USER_COMMAND'.

    MODIFY V_EVENTS FROM WA_EVENT TRANSPORTING FORM WHERE NAME = WA_EVENT-NAME.

  ENDIF.

3. double click column

FORM USER_COMMAND USING R_UCOMM LIKE SY-UCOMM

RS_SELFIELD TYPE SLIS_SELFIELD.

  CASE R_UCOMM.

    WHEN '&IC1'.
      READ TABLE IT_MATNR INDEX rs_selfield-tabindex.
      SET PARAMETER ID : 'MAT' FIELD IT_MATNR-MATNR.
      CALL TRANSACTION 'MM03' AND SKIP FIRST SCREEN.

  ENDCASE.

ENDFORM.                    "user_command

4. add event internal table in ALV function.

CALL FUNCTION 'REUSE_ALV_LIST_DISPLAY'
   EXPORTING
     I_CALLBACK_PROGRAM                = V_REPID
     I_CALLBACK_USER_COMMAND           = 'USER_COMMAND'
     IS_LAYOUT                         = ALV_LAYOUT
     IT_FIELDCAT                       = I_FIELDCAT[]
     I_SAVE                            = 'A'
     IT_EVENTS                         = V_EVENTS
    TABLES
      T_OUTTAB                          = IT_DATA
            .

Thanks,

Yawa

0 Kudos

Hi Yawa,

thanks for reply,

its not my requirement this i have already achieved, my requirement is to bring back the control to list output while i click on any button on standard t-code in display mode of that screen.

hope you got

With regards,

Vikas

0 Kudos


Just click on the BACK button in tool menu line. It can be back from requirement Tcode screen to ALV report.

0 Kudos

but its not working , that why i place this requirement.

with regards,

vikas

0 Kudos


When call transaction need to skip first screen. do you use the statement?

0 Kudos

i all ready used that one.

0 Kudos

Hi Vikas,

Are you using call transaction?

If you using SUMBIT, to get back the control to ALV you have to add 'AND RETURN' statement with SUBMIT.

Is there any statement LEAVE LIST PROCESSING after call transaction?

Still if it is not working paste your code.

Regards

Sreekanth

0 Kudos

Hi Sreekanth,

i am using call transaction.

not submit, as i am calling standard transaction by alv list output.

any solution?

with regards,

vikas

0 Kudos

I have done this, pls refer the code..

CASE r_ucomm.

     WHEN '&IC1'.

       IF rs_selfield-sel_tab_field = 'GWA_FLDCAT_2'.

         SET PARAMETER ID 'ANF' FIELD rs_selfield-value.

         CALL TRANSACTION 'ME43' AND SKIP FIRST SCREEN.

       endif.

0 Kudos

thats i have already done.

my control is not coming back to alv list output. just my t-code is LS26 every thing same as per your coding.. control go to standard transaction and not back to list output.

thats my requirement , how to achieve this?

sap version is sap 40B.

with regrads,

vikas

0 Kudos

Exit out the logon of system. login again to try.

0 Kudos

thanks

0 Kudos

This message was moderated.

raymond_giuseppi
Active Contributor
0 Kudos

A single CALL TRANSACTION will often get back to the caller when called transaction ends. Sometimes some transaction use statements that break the rule, also a BDC would be usually fully interrupted, but not MM0. Did you change any value in RS_SELFIELD, e.g. setting exit or refresh subfields ?

You could put a break-point at statement following the CALL TRANSACTION and try a little debug.

Regards,

Raymond

0 Kudos

Hi Raymond,

i have not set any value in RS_selfiled for exit and refersh.

and while dubugg it takes me to standard code from standard t-code.

with regards,

vikas

0 Kudos

any solution ? from any one?

0 Kudos

please check below link.

hope it can help you.

Former Member
0 Kudos

Hi Vikas,

Why cant you try to create a PF status and declare "Back" button and write the necessary OK code commands.


Regards,

Kannan