Skip to Content
author's profile photo Former Member
Former Member

CALL TRANSACTION 'SU01' USING bdcdata

Dear experts,


I have implemented a method for a 2xclick event of an alv grid, which shows the user (CALL TA 'SU01'), please see code below.

Everything works fine, but when I click the back button, I don't get back to the ALV Grid screen, but to the User Maintenance Screen of SU01. Then I have to click back again to navigate back to the ALV grid.

Is there any way to avoid the back button to jump to the User Maintenance Screen through the batch input?

Is there any parameter id for display? I have not found that yet... If there would be any, I could CALL TRANSACTION 'SU01' AND SKIP FIRST SCREEN.

Please advise me how to proceed.

Also, could you please be so kind and explain how can I find certain parameters like 'MXX' for MM03? I know I can look into TPARA, or furher characteristics of a data element, but how can I find which hidden parameters like 'MXX' for TA MM03 or 'KDY' for TA MK03 I have to use for each transaction?


IF e_column = 'USERNAME' OR e_column = 'FULLNAME'.

READ TABLE gt_cdresults INDEX e_row INTO gs_cdresults.

SET PARAMETER ID 'XUS' FIELD gs_cdresults-username.

CLEAR bdcdata_tab.

CLEAR opt.

CLEAR bdcdata_wa.

bdcdata_wa-program = 'SAPLSUU5'.

bdcdata_wa-dynpro = '0050'.

bdcdata_wa-dynbegin = 'X'.

APPEND bdcdata_wa TO bdcdata_tab.

CLEAR bdcdata_wa.

bdcdata_wa-fnam = 'USR02-BNAME'.

bdcdata_wa-fval = gs_cdresults-username.

APPEND bdcdata_wa TO bdcdata_tab.

CLEAR bdcdata_wa.

bdcdata_wa-fnam = 'BDC_OKCODE'.

bdcdata_wa-fval = '=SHOW'.

APPEND bdcdata_wa TO bdcdata_tab.

opt-DISMODE = 'E'.

CALL TRANSACTION 'SU01' USING bdcdata_tab

OPTIONS FROM opt.

ENDIF.

Thank you for your help!

BR,

Matei

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

3 Answers

  • Best Answer
    Posted on Jun 28, 2016 at 11:19 AM

    For which version are you coding, AFAIK you should no longer use SE01 or SU10 as of NetWeaver Release 7.3. So you should

    • (lazzy) use SE01_OLD and SE10_OLD
    • find some BAPI_USER* functions

    Regards,

    Raymond

    Add a comment
    10|10000 characters needed characters exceeded

    • So your version should be allowed, could you try to use this provided FM

      CALL FUNCTION 'SUSR_USER_MAINT_WITH_DIALOG'

      EXPORTING

      maint_for_own_user_only = abap_false

      display_only = abap_true

      user_to_display = i_uname

      EXCEPTIONS

      error_writing_to_db = 0

      OTHERS = 0.

      NB: This FM is RFC enabled, so you could even call it DESTINATOIN NONE.

      Regards,

      Raymond

  • Posted on Jun 28, 2016 at 11:29 AM

    You have to define this BDC data:

    Dynpro 1:

    SAPLSUU5 0050 X

    USR02-BNAME <user>

    BDC_OKCODE =SHOW

    Dynpro 2:

    SAPLSUU5 0050 X

    BDC_OKCODE =BACK (I'm not sure if this is the right value)

    Explanation: the BDC data is set in stand-by when the real dynpro displayed is different from the BDC data dynpro, and BDC continues to process the BDC data only when the real dynpro displayed equals the one in the BDC data.

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Jun 28, 2016 at 11:39 AM

    hi Matei,

    It needs to find out the FNAM & FVAL values of ALV Grid screen in the current version, and we can get the values by recording SHDB - hope you aware..

    Then, just validate the FNAM/FVAL values and provide these values at your code - place of code is just after BACK button.

    Hope, it serves the purpose.

    Regards,

    Suren.

    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.