Skip to Content

problem in passing selection screen values using CALL TRANSACTION.

Hi All

I am facing problem in transfering selection screen values to the called transaction. I am trying to pass the path of the transaction filer but to no avail. The variable for filepath is not empty.

Below is my code:

DATA: lt_bdcdata TYPE TABLE OF bdcdata,
       wa_bdcdata TYPE bdcdata,
       opt TYPE ctu_params.

CLEAR wa_bdcdata.

wa_bdcdata-program  = 'RFBASM00'.
wa_bdcdata-dynpro   = '1000'.
wa_bdcdata-dynbegin = 'X'.
APPEND wa_bdcdata TO lt_bdcdata.
CLEAR wa_bdcdata.

wa_bdcdata-fnam = 'BDC_CURSOR'.
wa_bdcdata-fval = 'RFPDO1-FEBUMSF'.
APPEND wa_bdcdata TO lt_bdcdata.
CLEAR wa_bdcdata.

wa_bdcdata-fnam = 'RFPDO1-FEBUMSF'.
wa_bdcdata-fval = gv_filepath.
APPEND wa_bdcdata TO lt_bdcdata.
CLEAR wa_bdcdata.

wa_bdcdata-fnam = 'BDC_OKCODE'.
wa_bdcdata-fval = 'PASS'.
APPEND wa_bdcdata TO lt_bdcdata.
CLEAR wa_bdcdata.

opt-dismode = 'E'.
opt-updmode = 'S'.

CALL TRANSACTION 'FF_5' USING lt_bdcdata OPTIONS FROM opt.

Please help.

Harsh

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

3 Answers

  • author's profile photo Former Member
    Former Member
    Posted on Apr 15, 2011 at 03:37 AM

    Hi Harsh,

    I think you have entered wrong main program for tcode 'FF_5' and wrong screen field for the file name. Use the below code instead of yours.

    DATA: lt_bdcdata TYPE TABLE OF bdcdata,
           wa_bdcdata TYPE bdcdata,
           opt TYPE ctu_params,
           gv_filepath type char128 value 'C:\testfile.txt'.
    
    CLEAR wa_bdcdata.
    
    wa_bdcdata-program  = 'RFEBKA00'.
    wa_bdcdata-dynpro   = '1000'.
    wa_bdcdata-dynbegin = 'X'.
    APPEND wa_bdcdata TO lt_bdcdata.
    CLEAR wa_bdcdata.
    
    wa_bdcdata-fnam = 'BDC_CURSOR'.
    wa_bdcdata-fval = 'UMSFILE'.
    APPEND wa_bdcdata TO lt_bdcdata.
    CLEAR wa_bdcdata.
    
    wa_bdcdata-fnam = 'UMSFILE'.
    wa_bdcdata-fval = gv_filepath.
    APPEND wa_bdcdata TO lt_bdcdata.
    CLEAR wa_bdcdata.
    
    *wa_bdcdata-fnam = 'BDC_OKCODE'.
    *wa_bdcdata-fval = 'PASS'.
    *APPEND wa_bdcdata TO lt_bdcdata.
    *CLEAR wa_bdcdata.
    
    opt-dismode = 'A'.
    opt-updmode = 'S'.
    
    CALL TRANSACTION 'FF_5' USING lt_bdcdata OPTIONS FROM opt.
    

    Thanks.

    Regards,

    Jey

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Apr 15, 2011 at 03:50 AM

    Hi Harsh,

    Try the code below. The field name and program name you are using are different from actual field and program name for transaction FF_5.

    DATA : w_file(50) type c value 'C:/temp/test.csv'..
    
    DATA: bdcdata_wa  TYPE bdcdata,
          bdcdata_tab TYPE TABLE OF bdcdata.
    
    DATA opt TYPE ctu_params.
    
    CLEAR bdcdata_wa.
    bdcdata_wa-program  = 'RFEBKA00'.
    bdcdata_wa-dynpro   = '1000'.
    bdcdata_wa-dynbegin = 'X'.
    APPEND bdcdata_wa TO bdcdata_tab.
    
    CLEAR bdcdata_wa.
    bdcdata_wa-fnam = 'BDC_CURSOR'.
    bdcdata_wa-fval = 'UMSFILE'.
    APPEND bdcdata_wa TO bdcdata_tab.
    
    CLEAR bdcdata_wa.
    bdcdata_wa-fnam = 'UMSFILE'.
    bdcdata_wa-fval = w_file.
    APPEND bdcdata_wa TO bdcdata_tab.
    
    CLEAR bdcdata_wa.
    bdcdata_wa-fnam = 'BDC_OKCODE'.
    bdcdata_wa-fval = '=CIDI'.
    APPEND bdcdata_wa TO bdcdata_tab.
    
    opt-dismode = 'E'.
    opt-defsize = 'X'.
    
    CALL TRANSACTION 'FF_5' USING bdcdata_tab OPTIONS FROM opt.

    Add a comment
    10|10000 characters needed characters exceeded

  • Posted on Apr 15, 2011 at 04:21 AM

    It works.

    I am suppose to mention the screen field and not the field name and the program name was obviously wrong.

    Thanks Jeya and Ram.

    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.