Bdcdata

Hi all,
       Could you please explain me this BDC program logic flow?
data : begin of bdc-data occurs 100.
              include structure bdcdata.
data ; end of bdc_data.
perform dynro using :
'X' 'SAPLMGMW' '0100',
'' ' 'bdc_cursor' 'msichtausw-dytxt(07)',
' ' rmmw-matnr' p_matnr, (~user input)
call transaction 'mm42' using bdc_data mode 'A'.
form dynpro using dynbegin name value.
    clear bdc_data.
    if dynbegin eq 'X',
        move: name to bdc_data-program,
                  value to bdc_data-dynpro,
                   'X' to bdc_data-dynbegin.
   else.
   move : name to bdc_data-program,
              value to bdc_data-fval.
   endif.
   append bdc_data.
end form.
        My main concerns is what is the structure of bdcdata and how 'X' is realted to bdc_data-dynbegin.
Thanks in advance.
Will reward if useful.

hi,
in BDC, we can perform validations on legacy data by using MAPPING logic.
in mapping logic we use structure having name BDCDATA.
<b>fields of BDCDATA structure are....</b>
<b>BDCDATA-program-----> means module pool program which we r used in BDC.
BDCDATA-dynpro-------> means currentl active screen, for which screen we are 
                                    going to pass data.
BDCDATA-dynbegin----> means is the initial or default screen,default vale for this
                                    field is 'X'.
BDCDATA-fnam----
> field name which we are used in validations.
BDCDATA-fval----
>field value which we are used in validations</b>
the BDCADAT table comntains records, which are supported by SAP data type, form this table we pass data into data base tables by using transaction.
regards,
Ashokreddy.

Similar Messages

  • Call transaction CJIC using bdcdata and skip first screen

    I want to call transaction CJIC and skip first screen. I have set parameters for fields for which I need to pass data. But one field namely display variant has no parameter id. How can I pass value to it and also skip first screen?
    I have tried passing its value in bdcdata and also passing ONLI. But it does not run in mode "N". What can be the solution?

    Hi frnd,
    fortunately transaction CJIC is selection-screen of an executable program RKPEP012.......so u don hav to use call transaction and instead u can use SUBMIT statement................
    submit RKPEP012 WITH SELECTION-TABLE rspar
    Effect
    If you specify this addition, parameters and selection criteria on the selection screen are supplied from an internal table rspar. You must specify an internal table with the row type RSPARAMS for rspar. The structured data type RSPARAMS is defined in the ABAP Dictionary and has the following components, all of which are data type CHAR:
    SELNAME (length 8),
    KIND (length 1),
    SIGN (length 1),
    OPTION (length 2),
    LOW (length 45),
    HIGH (length 45).
    To supply parameters and selection criteria for the selection screen with specific values, the lines in the internal table rspar must contain the following values:
    SELNAME must contain the name of a parameter or selection criterion for the selection screen in block capitals
    KIND must contain the type of selection screen component (P for parameters, S for selection criteria)
    SIGN, OPTION, LOW, and HIGH must contain the values specified for the selection table columns that have the same names as the selection criteria; in the case of parameters, the value must be specified in LOW and all other components are ignored.
    If the name of a selection criterion is repeated in rspar, this defines a selection table containing several lines and passes it on to the selection criterion. If parameter names occur several times, the last value is passed on to the parameter.
    The contents of the parameters or selection tables for the current program can be entered in the table by the function module RS_REFRESH_FROM_SELECTOPTIONS.
    Notes
    In contrast to selection tables, the data types of the components LOW and HIGH in table rspar are always of type CHAR and are converted to the type of the parameter or selection criterion during transfer, if necessary.
    When entering values, you must ensure that these are entered in the internal format of the ABAP values, and not in the output format of the screen display.
    Revert back for queries.
    Cheers,
    Will.

  • Read currency values from the BDCDATA field FVAL

    HI All,
    I have a requirement where i need to read the value of some currency from the field FVAL of BDCDATA into a currency variable.
    simple assignment using = is not working because the FVAL value may contain , or . in between depending upon the user parameters.
    ex:       FVAL = 100,000.00 in US
    and      FVAL = 100.000,00 in Europe.
    Is there any way we can handle this situation?
    Thanks,
    Prakash Pandey

    yes sorry
    DATA vl_dcpfm TYPE usr01-dcpfm.
    DATA vl_decimal_separator TYPE char01.
    DATA vl_thousands_separator TYPE char01.
    SELECT SINGLE dcpfm FROM usr01 INTO vl_dcpfm WHERE bname = sy-uname.
    CASE vl_dcpfm.
       WHEN space.
    * FRANCE 1 ...
         vl_thousands_separator = '.'.
         vl_decimal_separator = ','.
       WHEN 'X'.
    * USA ...
         vl_thousands_separator = ','.
         vl_decimal_separator = '.'.
       WHEN 'Y'.
    * FRANCE 2 ...
         vl_thousands_separator = space.
         vl_decimal_separator = ','.
    ENDCASE.
    Maybe there were new codes added recently, I don't know

  • Structure of bdcdata

    hi frds plz give me response
       what is the Structure of BDCDATA
    plz give me response to my mail id
    [email protected]

    Hi,
    Go to transaction SE11 and enter BDCDATA in the Tables field and display.
    You can see the structure from there:
    PROGRAM
    DYNPRO
    DYNBEGIN
    FNAM
    FVAL
    Cheers,
    Aditya

  • REFRESH BDCDATA

    Hi Gurus ,
    Could anyone guide me for the folowing scenario : -BDC Call transaction
      A custom report was created to extend payee vendors for every principal vendors in two company codes : xxxx and yyyy.
      But when ever tested : the payee vendors were getting created for one company code and later when the same payee vendor details were being passed as Reference Vendor information : it was not creating vendors in the other company code : yyyy.
    using FK01 : creating vendors .
    1st Step : provide company code (xxxx) and Account groupdetails in FK01 : vendor created through custom interface.
    2nd Step : created vendor details : Vendor Number (created in step1),  Company Code (yyyy), Account group(grp1) and Reference Vendor details : Vendor number (created in step1) , Company Code (xxxx) were suppose to be passed through
    the BDC process.
    While testing the BDC the first step was executing fine no issues but while executing the second step the reference field details were not populating automatically (it was blank) although the Recording was correct , all the neccessary BDC code were available .
    Now between the first and second creation there was a BDC table which was being populated with DYNNAME , FNAME FVAL detatils: all the BDC details were in that table. I have used a REFRESH BDCDATA between 1st and 2 nd step (as mentioned above) and then it started creating the vendors with reference details also.
    Could you please tell me the importance of REFRESH BDCDATA ?
    My question is : what is the importance of REFRESH BDCDATA : since after adding that i could check that all the neccessary details were being populated to the screen fields of FK01 (first screen) through BDC ?
    Thanks
    Kylietisha
    Edited by: kylietisha on Jun 23, 2010 7:03 AM

    Hi Kylietisha,
                     A transaction can contain many screens, in ur case FK01 u r updating in 2 screens.
                     For eg. if u have to uplaod 10 vendor creation ie (10 records in flat file)  using BDC in ur case each record will go to 2 screens then BDCDATA internal table will populate first record i.e data for two screens.
                      After completing 1st record(i.e for 2 screens) before going to 2nd record u have to refresh table BDCDATA the reason is if u don't REFRESH  the 1st record will also be there so when transaction is called 1st record data will go.
                 Plz check wheter data for whole cycle of the transaction is present in BDCDATA and ur refreshing when ur going for 2nd record.
    Hope this might help u............

  • How to set BDCDATA table for a SELECT-OPTIONS object?

    Dear experts,
    I have a transaction with PARAMETERS and SELECT-OPTIONS objects. This transaction will be called by another program by using CALL TRANSACTION 'mytransaction' USING mybdcdata statement. Below is some of the called transaction's source code:
    DATA:
      date TYPE sflight-fldate.
    PARAMETERS:
      p_carid TYPE sflight-carrid,
      p_conid TYPE sflight-connid.
    SELECT-OPTIONS:
      so_date FOR date.
    This is what I wrote in the calling program to define the values of the called transaction PARAMETERS fields:
    DATA:
      wa_bdcdata TYPE bdcdata,
      it_bdcdata TYPE TABLE OF bdcdata.
    wa_bdcdata-program = 'MYPROGRAM'.
    wa_bdcdata-dynpro = '1000'.
    wa_bdcdata-dynbegin = 'X'.
    APPEND wa_bdcdata TO it_bdcdata.
    CLEAR wa_bdcdata.
    wa_bdcdata-fnam = 'P_CARID'.
    wa_bdcdata-fval = 'AA'.
    APPEND wa_bdcdata TO it_bdcdata.
    CLEAR wa_bdcdata.
    wa_bdcdata-fnam = 'P_CONID'.
    wa_bdcdata-fval = '017'.
    APPEND wa_bdcdata TO it_bdcdata.
    CALL TRANSACTION 'MYTRANSACTION' USING it_bdcdata.
    Unfortunately, I don't know how to set the values for the SELECT-OPTIONS screen fields. How to do this?
    I've Googled this and tried several guesses but none was found or successful. Thanks in advance.
    Regards,
    Haris

    Hi ,
      Better go for  SUBMIT report   instead of CALL transaction  ...
      find the name  of  report being called  on that transaction which you will be calling  . Use that report name in SUBMIT 
    Just take help from  below code .
    Before using do please read  by pressing f1 on SUBMIT  syntax .
    data:seltab     type table of rsparams,
             seltab_wa  like line of seltab.
        move: 'LANGU'  to seltab_wa-selname,
              'S'      to seltab_wa-kind,
              'I'      to seltab_wa-sign,
              'BT'     to seltab_wa-option,
              'D'      to seltab_wa-low,
              'I'      to seltab_wa-high.
        append seltab_wa to seltab.
        clear seltab_wa.
        move: 'E'      to seltab_wa-sign,
              'EQ'     to seltab_wa-option,
              'F'      to seltab_wa-low,
              space    to seltab_wa-high.
        append seltab_wa to seltab.
        clear seltab_wa.
        move: 'AUFNR' to seltab_wa-selname,
              p_aufnr to seltab_wa-low.
        append seltab_wa to seltab.
        clear seltab_wa.
        submit rkaep000  using selection-set 'VARIANT1'
                          with aufnr = p_aufnr
                          with selection-table seltab
                          exporting list to memory
                          and return .
    regards
    Deepak.

  • Message type in BDCMSGCOLL Structure in Call transaction using BDCDATA

    Hi,
    We are facing issue while capturing message in BDCMSGCOLL structure in Call transaction using bdcdata. The message which are like
    Message 'Message Text' Type 'S' Display LIke 'E' .
    This message is captured as Success on the Message structure instead of error & user are asking to update it as Error as it is looking like Error message to the end user.
    Please provide resolution to the issue.
    Regards,
    Kapil

    Hi Venkat,
    I am not doing any upload, i am just doing a replay of the transaction ME21 & in that there are many error message which encounter while creating a PO but when i have check the logic , they are basically a success message which are display like Error so when i have called ME21 transaction using below statement
    call transaction ME21 using BDCDATA
                                            into messages bdcmsgcoll.
    I am getting the message as success only since the message are of type success but as they are display like E , so user want that in msgcoll structure these messages must be shown as Error.
    Regards,
    Kapil.

  • Which file path should I pass bdcdata table

    Hi ,
    I have the following scenario.
    There is a button in the standard transaction which opens a dialog box. User can choose a file in the dialog box. That file will be uploaded in the transaction.
    I need to write a bdc for this transaction. What file path I need to pass through BDCDATA table? Will it take file from application server or presentation server?
    Thanks is advance.
    Raktim

    Dear Jorge,
    I got the the recording. Now I need to pass the file path whoch called transaction is expecting. Should I pass path in the application server or presentation server?
    Thanks
    Raktim

  • Where is the SAP logic to process the BDCDATA?

    Hi, expert.
    Where is the SAP logic to process the BDCDATA that we passed on CALL TRANSACTION 'VA01' using bdcdata mode.....?
    On the other words, can I see the SAP logic to understand how SAP process 'CALL TRANSACTION' statement?
    Thanks.

    Martin,
    thanks for the reply.
    I understand 'CALL TRANSACTION' works, SAP propagates the value to VA01 screen based on the records we built on the BDCDATA internal table.  
    For example, we are going to create order with 5 line items.  However, the 1st line itme is okey, but 2nd line itme we hit a material error, so BDC stopped.  We have requirement that want to remove 2nd line item and want BDC continue to process for 3rd, 4th, 5th line items.   User can run CALL TRANSACTION with mode 'E'.  So BDC will stop when hit error.  at this point user can delete item use SAP 'delete' icon.   But the problem is BDC still have leftover records for 2nd item.   I hope there is way to locate BDCrecords and in the userexit to remove the leftover BDC records for 2nd item.  Then BDC can continue to process 3rd item....   That is why I try to find how SAP logic behind 'CALL TRANSACTION' and hoping to locate where is the SAP logic that process BDCDATA record one by one....  hence I can think about how to cleanup/delete leftover BDC records for 2nd line item.
    I put breakpoint at 'CALL TRANSACTION' statement and then click 'single step'.  But next step, it immediately stop in the VA01 main program 'SAPMV45A' module transaktion_init.  I was hopping the next step will stop in the SAP program that I can see it handles/loops BDCDATA...  But not.

  • BDCDATA error-Field INVFO-ZUONR does not exist in the screen SAPLMR1M 6000

    Hi
    I am trying to call transaction MIR7 from ABAP code and passing values to the same.
    I am able to pass data to first tab using code (as recorded in SHDB) :
        DATA BEGIN OF BDCDATA OCCURS 1.
        INCLUDE STRUCTURE BDCDATA.
        DATA END OF BDCDATA.
        CLEAR BDCDATA.
        BDCDATA-PROGRAM  = 'SAPLACHD'.
        BDCDATA-DYNPRO   = '1000'.
        BDCDATA-DYNBEGIN = 'X'.
        APPEND BDCDATA.
        CLEAR BDCDATA.
        BDCDATA-FNAM     = 'BKPF-BUKRS'.
        BDCDATA-FVAL     = CompCode.
        APPEND BDCDATA.
        CLEAR BDCDATA.
        BDCDATA-PROGRAM  = 'SAPLMR1M'.
        BDCDATA-DYNPRO   = '6000'.
        BDCDATA-DYNBEGIN = 'X'.
        APPEND BDCDATA.
        CLEAR BDCDATA.
        BDCDATA-FNAM     = 'INVFO-BLDAT'.
        BDCDATA-FVAL     = InvoiceDate.
        APPEND BDCDATA.
        CLEAR BDCDATA.
        BDCDATA-FNAM     = 'INVFO-WRBTR'.
        BDCDATA-FVAL     = InvoiceAmount.
        APPEND BDCDATA.
        Call Transaction 'MIR7' USING BDCDATA MODE 'A'.
    But when I add fields
        CLEAR BDCDATA.
        BDCDATA-FNAM     = 'INVFO-ZUONR'.
        BDCDATA-FVAL     = 'HELLO !!!!!'.
        APPEND BDCDATA.
        CLEAR BDCDATA.
        BDCDATA-FNAM     = 'INVFO-BKTXT'.
        BDCDATA-FVAL     = 'MY DATA .........'.
        APPEND BDCDATA.
    I get an error message :
    Field INVFO-ZUONR does not exist in the screen SAPLMR1M 6000
    But when I add
        CLEAR BDCDATA.
        BDCDATA-PROGRAM  = 'SAPLFDCB'.
        BDCDATA-DYNPRO   = '0150'.
        BDCDATA-DYNBEGIN = 'X'.
        APPEND BDCDATA.
    before setting INVFO-ZUONR, the error disappears, still I don't get values in HeaderText and Assignment fields on GUI
    Can anybody help.
    Thanks a lot
    Ruhi Hira

    I had used the exact recording as in SHDB but no success.
    Is it OK to create a parameter map this screen field to the parameter.
    Where I can set the parameter outside the screen..
    Ruhi Hira

  • BDCDATA for include ZXVEDU04 of EXIT_SAPLVEDA_002?

    I am attempting to write my first user exit for an Inbound IDoc. Outbound seems easy by comparison. I am going to add a date to VBAK-MAHDT from an extended ORDERS03 segment. The new IDoc type is called 'Z_EK_ORDERS03' and my extended segment is pretty much like E1EDK03.
    I'm working with enhancement VEDA0001. For include ZXVEDU03 of component EXIT_SAPLVEDA_001 I have this so far:
    DATA:
      w_z1edk03 LIKE z1edk03,
      w_vbak LIKE vbak.
    IF contrl-mestyp = 'ORDERS' AND
      contrl-idoctp = 'Z_EK_ORDERS03'.
      CASE segment-segnam.
        WHEN 'Z1EDK03'.
          IF segment-sdata(3) = 'Z01'.
            w_z1edk03 = segment-sdata.
            MOVE dxvbak TO w_vbak.
            w_vbak-mahdt = w_z1edk03-datum.
            MOVE w_vbak TO dxvbak.
          ENDIF.
        WHEN OTHERS.
      ENDCASE.
    ENDIF.
      Now I need to insert the date into the right screen using include ZXVEDU04 of EXIT_SAPLVEDA_002. I have this so far:
    DATA:
      x_bdc LIKE bdcdata OCCURS 0,
      w_vbak LIKE vbak,
      w_bdc TYPE bdcdata,
      i_bdc TYPE I.
    MOVE dxbdcdata TO w_bdc.
    IF w_bdc-fnam EQ SPACE.
      i_bdc = sy-tabix - 1.
      READ TABLE dxbdcdata INDEX i_bdc.
      MOVE dxbdcdata TO w_bdc.
    ENDIF.
    IF w_bdc-fnam = 'BDC_OKCODE' AND
      w_bdc-fval = 'SICH'.
      CLEAR w_bdc.
      LOOP AT dxbdcdata INTO w_bdc.
        APPEND w_bdc TO x_bdc.
        CASE w_bdc-fnam.
          WHEN 'VBKD-BSTKD'.
            MOVE dxvbak TO w_vbak.
            IF NOT w_vbak-mahdt IS INITIAL.
              w_bdc-fnam = 'VBAK-MAHDT'.
              w_bdc-fval = w_vbak-mahdt.
              APPEND w_bdc TO x_bdc.
            ENDIF.
          WHEN OTHERS.
        ENDCASE.
      ENDLOOP.
      dxbdcdata[] = x_bdc[].
    ENDIF.
    This gives me an error of 'VBAK-MAHDT does not exist for screen 4001'. Do I have to add BDC records for screen '4351'? If I do what would the OPCODE be? Is there an easier way to accomplish my goals rather than using BDC at all?

    OK, I've tried inseting this in various positions of the BDCDATA table but it is not working. With this latest code I get 'No batch input data for screen SAPMV45A 4002' error.
    DATA:
      x_bdc LIKE bdcdata OCCURS 0,
      w_vbak LIKE vbak,
      w_bdc TYPE bdcdata,
      n_bdc TYPE bdcdata,
      i_bdc TYPE I,
      done TYPE C.
    MOVE dxbdcdata TO w_bdc.
    IF w_bdc-fnam EQ SPACE.
      i_bdc = sy-tabix - 1.
      READ TABLE dxbdcdata INDEX i_bdc.
      MOVE dxbdcdata TO w_bdc.
    ENDIF.
    IF w_bdc-fnam = 'BDC_OKCODE' AND
      w_bdc-fval = 'SICH'.
      CLEAR w_bdc.
      LOOP AT dxbdcdata INTO w_bdc.
        APPEND w_bdc TO x_bdc.
        IF w_bdc-fval = 'KPAR_SUB' AND done IS INITIAL.
          MOVE dxvbak TO w_vbak.
          IF NOT w_vbak-mahdt IS INITIAL.
            n_bdc-program = 'SAPMV45A'.
            n_bdc-dynpro = 4351.
            n_bdc-dynbegin = 'X'.
            APPEND n_bdc TO x_bdc.
            CLEAR n_bdc.
            n_bdc-fnam = 'VBAK-MAHDT'.
            n_bdc-fval = w_vbak-mahdt.
            APPEND n_bdc TO x_bdc.
            CLEAR n_bdc.
            n_bdc-fnam = 'BDC_OKCODE'.
            n_bdc-fval = 'KBES'.
            APPEND n_bdc TO x_bdc.
            CLEAR n_bdc.
          ENDIF.
          done = 'X'.
        ENDIF.
      ENDLOOP.
      dxbdcdata[] = x_bdc[].
    ENDIF.
    Does anyone have an example of hopw this is supposed to work?

  • Filling range using..... bdcdata

    Hi ,
    I have a requuirement that , need to call a standard report in a new session when i click on first level output.Am using ' FM ABAP4_CALL_TRANSACTION' STARTING NEW TASK to create anew session by  filling bdcdata
    but problem is...i wanted to submit a range to report.
    Can any one let me know how to submit a range using BDCDATA...
    Thanks in advance..
    Regards,
    Anand Lokineni.

    Hi,
    I believe by ranges you mean data to select options of a selection screen ?
    If yes, I just recorded one standard transaction tx.MB5S and created a function module for the recording.
    Here is the snippet of the function module:
    FUNCTION Z_MB5S_CALL.
    " this is the part which populated the select option of the selection screen.
    perform bdc_dynpro      using 'SAPLALDB' '3000'.
    perform bdc_field       using 'BDC_OKCODE'
                                  '=ACPT'.
    " The value is passed by first setting the cursor on the field and then setting the value.
    "1. Set the cursor.
    perform bdc_field       using 'BDC_CURSOR'
                                  'RSCSEL-SLOW_I(01)'.
    "2. Set the value
    perform bdc_field       using 'RSCSEL-SLOW_I(01)' 
                                  SLOW_I_01_002.
    " Same for the others.
    perform bdc_field       using 'RSCSEL-SLOW_I(02)'
                                  SLOW_I_02_003.
    perform bdc_field       using 'RSCSEL-SLOW_I(03)'
                                  SLOW_I_03_004.
    perform bdc_field       using 'RSCSEL-SLOW_I(04)'
                                  SLOW_I_04_005.
    perform bdc_field       using 'RSCSEL-SLOW_I(05)'
                                  SLOW_I_05_006.
    perform bdc_field       using 'RSCSEL-SLOW_I(06)'
                                  SLOW_I_06_007.
    perform bdc_field       using 'RSCSEL-SLOW_I(07)'
                                  SLOW_I_07_008.
    perform bdc_field       using 'RSCSEL-SLOW_I(08)'
                                  SLOW_I_08_009.
    perform bdc_field       using 'RSCSEL-SLOW_I(09)'
                                  SLOW_I_09_010.
    perform bdc_dynpro      using 'RM07MSAL' '1000'.
    perform bdc_field       using 'BDC_CURSOR'
                                  'LIFNR-LOW'.
    perform bdc_field       using 'BDC_OKCODE'
                                  '=ONLI'.
    perform bdc_field       using 'EKORG-LOW'
                                  LOW_011.
    perform bdc_field       using 'FINAL'
                                  FINAL_012.
    perform bdc_dynpro      using 'SAPMSSY0' '0120'.
    perform bdc_field       using 'BDC_OKCODE'
                                  '=&F03'.
    perform bdc_dynpro      using 'RM07MSAL' '1000'.
    perform bdc_field       using 'BDC_OKCODE'
                                  '/EE'.
    perform bdc_field       using 'BDC_CURSOR'
                                  'LIFNR-LOW'.
    perform bdc_transaction tables messtab
    using                         'MB5S'
                                  CTU
                                  MODE
                                  UPDATE.
    if sy-subrc <> 0.
      subrc = sy-subrc.
      exit.
    endif.
    perform close_group using     CTU.
    ENDFUNCTION.
    This is a custom function module, so you can tweak this function's tables parameter to receive the list of values for the range and loop at this list and populate the range/select options as shown above.
    Hope this solves the issue.
    regards,
    Advait

  • How to avoid BDCDATA getting cleared

    I am updating TCODE - OH11
    The SAP Standard memory is clearing the values which i am trying to update using BDCDATA.
    How to avoid this happening

    Hi Me too facing the same problem.Looks Like onblur event is getting fired when applet is loaded which is taking the focus to the image applet .So how do we block the onblur from getting invoked.

  • About  BDCDATA structure?

    what is BDCDATA structure?

    hi,
    For uploading data using BDC we have to upload data to internal table first
    Then the data from internal table is not transferred directly to database table, it has to go through transaction. You need to pass data to particular screen and to particular screen-field. Data is passed to transaction in particular format, hence there is a need for <b>batch input structure</b>.
    The batch input structure stores the data that is to be entered into SAP system and the actions that are necessary to process the data. The batch input structure is used by all of the batch input methods. You can use the same structure for all types of batch input, regardless of whether you are creating a session in the batch input queue or using CALL TRANSACTION.
    This structure is BDCDATA, which can contain the batch input data for only a single run of a transaction. The typical processing loop in a program is as follows:
    • Create a BDCDATA structure
    • Write the structure out to a session or process it with CALL TRANSACTION USING; and then
    • Create a BDCDATA structure for the next transaction that is to be processed.
    Within a BDCDATA structure, organize the data of screens in a transaction. Each screen that is processed in the course of a transaction must be identified with a BDCDATA record. This record uses the Program, Dynpro, and Dynbegin fields of the structure.
    The screen identifier record is followed by a separate BDCDATA record for each value, to be entered into a field. These records use the FNAM and FVAL fields of the BDCDATA structure. Values to be entered in a field can be any of the following:
    • Data that is entered into screen fields.
    • Function codes that are entered into the command field. Such function codes execute functions in a transaction, such as Save or Enter.
    The BDCDATA structure contains the following fields:
    • PROGRAM: Name of module pool program associated with the screen. Set this field only for the first record for the screen.
    • DYNPRO: Screen Number. Set this field only in the first record for the screen.
    • DYNBEGIN: Indicates the first record for the screen. Set this field to X, only for the first record for the screen. (Reset to ‘ ‘ (blank) for all other records.)
    • FNAM: Field Name. The FNAM field is not case-sensitive.
    • FVAL: Value for the field named in FNAM. The FVAL field is case-sensitive. Values assigned to this field are always padded on the right, if they are less than 132 characters. Values must be in character format.

  • CAL TRANSACTION ' QE51N' USING BDCDATA

    Dear all,
    i have problem in the transaction QE51N, i explain:
    The objective of my program Z is to call  the QE51N and to fill one of his select-options with values which I already recovered in the progam  Z.
    Now all is Ok, I could fill the table BDCDATA with the valuesu2026 and I called the QE51N using CAL TRANSACTION ' QE51N' USING BDCDATA
    Currently ==> when I save in the QE51N  I turn over to the special program (thing which I dont  want) 
    I want to leave completely the program and to remain that in the QE51N.
    I tested " LEAVE PROGRAM" after the CAL TRANSACTION but that made leave the program and the QE51N.
    there is a possibility to do that?
    NB: SUBMIT PROGRAM ==KO because the program of the QE51N is of type module pool. 
    Thanks in advance
    Edited by: Abaper_R3 on Jan 23, 2010 3:46 PM

    To remain on the last screen of a CALL TRANSACTION, you must call it using MODE 'E'.
    If it doesn't stop, it probably means that there is an issue with the existing CALL TRANSACTION which doesn't even reach the last screen: call it with MODE 'A' to make sure (it displays all screens). If it reaches the last screen using MODE 'A', then there are 2 possibilities why it doesn't reach it in MODE 'E' (or 'N'):
    1) Either there is an intermediate COMMIT WORK which stops the CALL TRANSACTION (solution is then to use OPTIONS FROM <structure> and set <structure>-RACOMMIT = 'X' (request to not stop the CALL TRANSACTION if a COMMIT WORK is reached)
    2) or the program detects that the transaction is called using CALL TRANSACTION and reacts differently. If the program tests SY-BINPT, then you may run the program use OPTIONS FROM <structure> and set <structure>-NOBINPT = 'X'). If the program tests other things (SY-CPROG, SY-CALLD, etc.), then the only possiblity is probably a modification of the standard!
    Of course, all this is explained in the ABAP documentation of CALL TRANSACTION.

Maybe you are looking for