Update Transaction(IQS2) using BDC

Hi All,
I am developing BAPI (using BDC) which creates quality notification in SAP which is entered via front end web application. Structure p_qmsm contain 3 lines of task in notification. The code is as given below. To avoid problem of large no of lines on screen,code lines starting with * is used. This actually for pagedown after entering every 2 lines and creates new line. so that 2 lines always push up on screen and there will not be problem for creating large no of lines on screen
perform bdc_dynpro using 'SAPLIQS0' '7200'.
perform bdc_field using 'BDC_OKCODE' '=10\TAB11'.
LOOP AT p_qmsm INTO wa_qmsm.
perform bdc_dynpro using 'SAPLIQS0' '7204'.
perform bdc_field using 'BDC_OKCODE' '/00'.
CONCATENATE 'VIQMSM-QSMNUM(' wa_qmsm_cntr ')' INTO wm_qmsm_qsmnum.
CONCATENATE 'VIQMSM-MNGRP(' wa_qmsm_cntr ')' INTO wm_qmsm_mngrp.
CONCATENATE 'VIQMSM-MNCOD(' wa_qmsm_cntr ')' INTO wm_qmsm_mncod.
CONCATENATE 'VIQMSM-MATXT(' wa_qmsm_cntr ')' INTO wm_qmsm_matxt.
CONCATENATE 'VIQMSM-PSTER(' wa_qmsm_cntr ')' INTO wm_qmsm_pster.
CONCATENATE 'VIQMSM-PETER(' wa_qmsm_cntr ')' INTO wm_qmsm_peter.
perform bdc_field using wm_qmsm_qsmnum wa_qmsm-qsmnum.
perform bdc_field using wm_qmsm_mngrp wa_qmsm-mngrp.
perform bdc_field using wm_qmsm_mncod wa_qmsm-mncod.
perform bdc_field using wm_qmsm_matxt wa_qmsm-matxt.
perform bdc_field using wm_qmsm_pster wa_qmsm_pster.
perform bdc_field using wm_qmsm_peter wa_qmsm_peter.
wa_qmsm_cntr = wa_qmsm_cntr + 01.
ENDLOOP.
CALL TRANSACTION 'IQS2' USING wt_bdc
MODE 'N'
UPDATE 'A'
MESSAGES INTO P_MESSTAB.
The same code is used in modify mode also.  web application is sending all 3 lines in modify mode even if single line is modified. It is already decided to send all rows back from web application to SAP in same sequence.  It is working fine if i comment 5 lines which is starting with *. But in modify mode,  how can i ensure that correct row is modified? and how can i achieve problem of large no of lines on screen?
Please suggest?
Edited by: Rob Burbank on Dec 14, 2009 3:20 PM

Moderator message - Please respect the 2,500 character maximum when posting. Post only the relevant portions of code. And please do not try to get around this by using two posts. I was able to re-format this by simply removing your commented out code.

Similar Messages

  • Updating transaction MD61 using information from inbound IDOC

    Is there any standard IDOC type for Planned Independent Requirement(having fields of table PBED and PBIM in its segment)?If such an IDOC type doesnt exist then i have to go for custom idoc type creation
    I have an inbound IDOC having 4 fields in its segment
    1.SAP Material number
    2.Plant
    3.Plant Quantity
    4.Requirement date
    Now i have to use this information in IDOC to update transaction MD61(create a planned order).
    constraints:
    in MD61 screen1
    SCREEN 1
    Material radio button is defaulted to on. This must also be set in the interface. Material number will be valued from the input file.
    Plant will be valued from the input file.
    Version number defaults to 00, so that value should also be used for the interface.
    Planning Horizon From and To dates will be the same date and valued from the input file.
    Planning Period should be set to D for Day
    SCREEN 2
    Material number should default from SCREEN 1 input. The interface should also do this.
    MRP Area will default from the Plant on SCREEN 1 input. The interface should also do this.
    Version will default from the 00 on SCREEN1. If needed on interface, also default to 00.
    Version Active checkbox will be checked by default.
    Base Unit of Measure will default from material master.
    Only a single date column will appear which should be the date input on SCREEN 1. Value this column with the quantity from the input file.
    Input fields are highlighted in screenshots below.
    After input is complete, use the SAVE icon to store the data.
    Kindly tell me the approach to prepare this interface?

    Done,used BAPI_REQUIREMENTS_CREATE TO DO SO

  • To update PO version using BDC

    Hi we have created a BDC for creating PO with reference to PR.
    we have a requirement for extending this BDC to  a new plant.
    In their master settings they have configured version management for PO in which requestor is mandatory.
    I am unable to record this version screen in my BDC.
    I cannot replace this BDC with BAPI. Can you please let me know how to handle this.
    << Priority normalized >>
    Edited by: Rob Burbank on Dec 15, 2011 9:43 AM

    Moderator message -
    When closing old threads, there is no need to add a comment. Adding a pasted answer like "Thank you" only brings old threads to the top of the forum list and pushes current ones down. If you do add a comment, please indicate just how the problem was resolved.
    Rob

  • Change transaction using BDC-problem for large number of lines on screen

    Hi All,
    I am developing BAPI (using BDC) which creates quality notification in SAP which is entered via front end web application. Structure p_qmsm contain 3 lines of task in notification. The code is as given below. To avoid problem of large no of lines on screen,code lines starting with * is used. This actually for pagedown after entering every 2 lines and creates new line. so that 2 lines always push up on screen and there will not be problem for creating large no of lines on screen
    perform bdc_dynpro using 'SAPLIQS0' '7200'.
    perform bdc_field using 'BDC_OKCODE' '=10\TAB11'.
    LOOP AT p_qmsm INTO wa_qmsm.
    *IF wa_qmsm_cntr > 2.
           wa_qmsm_cntr = 2.
           perform bdc_dynpro  using 'SAPLIQS0'                   '7204'.
           perform bdc_field   using 'BDC_OKCODE'                 '=PEND'.
    ENDIF.
    perform bdc_dynpro using 'SAPLIQS0' '7204'.
    perform bdc_field using 'BDC_OKCODE' '/00'.
    CONCATENATE 'VIQMSM-QSMNUM(' wa_qmsm_cntr ')' INTO wm_qmsm_qsmnum.
    CONCATENATE 'VIQMSM-MNGRP(' wa_qmsm_cntr ')' INTO wm_qmsm_mngrp.
    CONCATENATE 'VIQMSM-MNCOD(' wa_qmsm_cntr ')' INTO wm_qmsm_mncod.
    CONCATENATE 'VIQMSM-MATXT(' wa_qmsm_cntr ')' INTO wm_qmsm_matxt.
    perform bdc_field using wm_qmsm_qsmnum wa_qmsm-qsmnum.
    perform bdc_field using wm_qmsm_mngrp wa_qmsm-mngrp.
    perform bdc_field using wm_qmsm_mncod wa_qmsm-mncod.
    perform bdc_field using wm_qmsm_matxt wa_qmsm-matxt.
    wa_qmsm_cntr = wa_qmsm_cntr + 01.
    ENDLOOP.
    CALL TRANSACTION 'IQS2' USING wt_bdc
    MODE 'N' UPDATE 'A'  MESSAGES INTO P_MESSTAB.
    The same code is used in modify mode also. web application is sending all 3 lines in modify mode even if single line is modified. It is already decided to send all rows back from web application to SAP in same sequence. It is working fine if i comment 5 lines which is starting with *. But in modify mode, how can i ensure that correct row is modified? and how can i achieve problem of large no of lines on screen?Please suggest?

    Hi yogesh,
    how can i ensure that correct row is modified?
    1. For this we need to know two things ;
       a) the database table in which the entries are already stored
       b) the sequence in which they are displayed in the transaction.
    2. So before changing any line, we need to compare (the primary key values / important values)
       a) as per the database table and as per the incoming data from web application (using bapi)
      b) if the match is ok, it means that particular row was not modified, else modified.
    how can i achieve problem of large no of lines on screen?
    1. For this I am  not sure about the transaction and its screen. Manytimes for appending row on the screen,
      there is a PLUS + button on the grid toolbar. So for every entry, (inspite of some empty/filled rows already visible on the screen), we should use the + button, and this new row always appears on the top i.e. row number 1.
    hope this helps.
    regards,
    amit m.

  • UPDATING 0416 USING BDC

    HI ALL,
    CAN ANYONE TELL ME HOW TO UPDATE INFOTYPE 0416 USING BDC.
    THANKS IN ADVANCE.

    I HAVE UPDATED MY CONTACT PLZ SEND ME THE DETAILS.
    I AM NEW IN THIS FIELD SO I AM NOT ABLE TO WORKOUT.

  • Capture document no after saving a set of data using BDC

    Hi All,
    Can u give a useful solution  for caputuring data in a transaction.the scenario is:-
    1.an excel sheet data should be uploaded in a transaction O3URV_SS0 using BDC.----
    done with call transaction
    2.it will save all the line items associated with a particular header data.----
    done
    3.after save, it will generate a document no automatically for each header.----
    [this no is stored in the table OIUVL_SSTH]
    4.now I have 2 capture this doc no and print a message.
    for step 4  i have tried with GET PARAMETER ID.But  I am unable to get the doc no.
    can anyone give me the proper solutin and send me the piece of code.
    Thanks.

    Hi Kalpita,
    Hope you are handling the messages in your BDC process using the MESSAGES option in the CALL TRANSACTION. If so, after the CALL Transaction, check the Message table each line, most probably the required  Doc.No will be avaible in the message as a component for the success message.
    Eg. Document XXXXXXXXX created successfuly (  Here XXXXXXXXX  is the doc no. available in the message as a variable )
    Hope this will help you.
    Regards,
    Smart Varghese

  • I want in LSMW SAME CODING. THIS IS USING BDC CALL TRANSACTION

    REPORT  ZXX_BDC_PRA NO STANDARD PAGE HEADING LINE-COUNT 20
                                                LINE-SIZE 150 .
    Program Name  :ZXX_BDC_PRA                             *
    Object Id     :                                        *
    Develper Name : praveen                                *
    Start Date    : 25.06.07                               *
    Description   : uploading flat file to sap system      *
    *--structure for Data Uploading.
    DATA: BEGIN OF IT_STR ,
            VKORG LIKE RF02D-VKORG,
            VTWEG LIKE RF02D-VTWEG,
            SPART LIKE RF02D-SPART,
            KTOKD LIKE RF02D-KTOKD,
            NAME1 LIKE KNA1-NAME1,     
            SORTL LIKE  KNA1-SORTL,     
            ORT01 LIKE KNA1-ORT01,     
            PSTLZ     LIKE KNA1-PSTLZ,     
            LAND1 LIKE KNA1-LAND1,     
            SPRAS LIKE KNA1-SPRAS,
            END OF IT_STR.
    *--Internal Table for Data Uploading.
    DATA: ITAB  LIKE IT_STR OCCURS 0.
    *--Internal Table to sucessfull Records.
    DATA:   ITAB1 LIKE IT_STR OCCURS 0.
    *--Internal Table to Store Error Records.
    DATA:    ITAB2 LIKE STANDARD TABLE OF IT_STR WITH HEADER LINE.
    *--Internal Table for Storing the BDC data.
    DATA: BDCDATA LIKE BDCDATA OCCURS 0 WITH HEADER LINE.
    *--Internal Table for storing the messages.
    DATA:   MESSTAB LIKE BDCMSGCOLL OCCURS 0 WITH HEADER LINE.
    DATA:   COUNT TYPE I VALUE 1,
            S VALUE 0, E VALUE 0.
    Selection screen *
    SELECTION-SCREEN BEGIN OF BLOCK b1
                     WITH FRAME TITLE TEXT-001.
    PARAMETERS: P_FILE TYPE IBIPPARMS-PATH.
    SELECTION-SCREEN END OF BLOCK B1.
    AT SELECTION-SCREEN ON VALUE-REQUEST FOR P_FILE.
    *functionality to use drill down list
      CALL FUNCTION 'F4_FILENAME'
        EXPORTING
          PROGRAM_NAME  = SYST-CPROG
          DYNPRO_NUMBER = SYST-DYNNR
        IMPORTING
          FILE_NAME     = P_FILE.
    Start-of-selection *
    START-OF-SELECTION.
      DATA FILENAME TYPE STRING.
      FILENAME = P_FILE.
    *-- Form to upload flatfile data into the internal table.
      CALL FUNCTION 'GUI_UPLOAD'
        EXPORTING
          FILENAME                = FILENAME
          FILETYPE                = 'ASC'
          HAS_FIELD_SEPARATOR     = 'X'
        TABLES
          DATA_TAB                = ITAB
        EXCEPTIONS
          FILE_OPEN_ERROR         = 1
          FILE_READ_ERROR         = 2
          NO_BATCH                = 3
          GUI_REFUSE_FILETRANSFER = 4
          INVALID_TYPE            = 5
          NO_AUTHORITY            = 6
          UNKNOWN_ERROR           = 7
          BAD_DATA_FORMAT         = 8
          HEADER_NOT_ALLOWED      = 9
          SEPARATOR_NOT_ALLOWED   = 10
          HEADER_TOO_LONG         = 11
          UNKNOWN_DP_ERROR        = 12
          ACCESS_DENIED           = 13
          DP_OUT_OF_MEMORY        = 14
          DISK_FULL               = 15
          DP_TIMEOUT              = 16
          OTHERS                  = 17.
    *--Generating the BDC table for the fields of the internal table.
      LOOP AT ITAB INTO IT_STR.
        PERFORM BDC_DYNPRO      USING 'SAPMF02D' '0107'.
        PERFORM BDC_FIELD       USING 'BDC_CURSOR'
                                      'RF02D-KTOKD'.
        PERFORM BDC_FIELD       USING 'BDC_OKCODE'
                                      '/00'.
        PERFORM BDC_FIELD       USING 'RF02D-VKORG'
                                      IT_STR-VKORG.
        PERFORM BDC_FIELD       USING 'RF02D-VTWEG'
                                       IT_STR-VTWEG.
        PERFORM BDC_FIELD       USING 'RF02D-SPART'
                                      IT_STR-SPART.
        PERFORM BDC_FIELD       USING 'RF02D-KTOKD'
                                        IT_STR-KTOKD.
        PERFORM BDC_DYNPRO      USING 'SAPMF02D' '0110'.
        PERFORM BDC_FIELD       USING 'BDC_CURSOR'
                                      'KNA1-SPRAS'.
        PERFORM BDC_FIELD       USING 'BDC_OKCODE'
                                      '/00'.
        PERFORM BDC_FIELD       USING 'KNA1-NAME1'
                                    IT_STR-NAME1.
        PERFORM BDC_FIELD       USING 'KNA1-SORTL'
                                        IT_STR-SORTL.
        PERFORM BDC_FIELD       USING 'KNA1-ORT01'
                                        IT_STR-ORT01.
        PERFORM BDC_FIELD       USING 'KNA1-PSTLZ'
                                      IT_STR-PSTLZ.
        PERFORM BDC_FIELD       USING 'KNA1-LAND1'
                                      IT_STR-LAND1.
        PERFORM BDC_FIELD       USING 'KNA1-SPRAS'
                                        IT_STR-SPRAS.
        PERFORM BDC_DYNPRO      USING 'SAPMF02D' '0120'.
        PERFORM BDC_FIELD       USING 'BDC_CURSOR'
                                      'KNA1-TXJCD'.
        PERFORM BDC_FIELD       USING 'BDC_OKCODE'
                                      '/00'.
        PERFORM BDC_DYNPRO      USING 'SAPMF02D' '0125'.
        PERFORM BDC_FIELD       USING 'BDC_CURSOR'
                                      'KNA1-NIELS'.
        PERFORM BDC_FIELD       USING 'BDC_OKCODE'
                                      '/00'.
        PERFORM BDC_DYNPRO      USING 'SAPMF02D' '0360'.
        PERFORM BDC_FIELD       USING 'BDC_CURSOR'
                                      'KNVK-NAMEV(01)'.
        PERFORM BDC_FIELD       USING 'BDC_OKCODE'
                                      '=ENTR'.
        PERFORM BDC_DYNPRO      USING 'SAPMF02D' '0310'.
        PERFORM BDC_FIELD       USING 'BDC_CURSOR'
                                      'KNVV-BEGRU'.
        PERFORM BDC_FIELD       USING 'BDC_OKCODE'
                                      '/00'.
        PERFORM BDC_DYNPRO      USING 'SAPMF02D' '0324'.
        PERFORM BDC_FIELD       USING 'BDC_CURSOR'
                                      'KNVP-PARVW(01)'.
        PERFORM BDC_FIELD       USING 'BDC_OKCODE'
                                      '=ENTR'.
    *--Calling the transaction 'Vd01'.
        CALL TRANSACTION 'VD01' USING BDCDATA MODE 'N' UPDATE 'S'
        MESSAGES INTO MESSTAB.
        PERFORM MESSAGES.
        REFRESH : BDCDATA, MESSTAB.
      ENDLOOP.
    END-OF-SELECTION.
    *--Populating the Success records internal table.
      IF ITAB1[] IS NOT INITIAL.
    format color 5.
        WRITE: /'SUCCESSFUL RECORDS'.
        format color off.
        LOOP AT ITAB1 INTO IT_STR.
          WRITE:/ IT_STR-VKORG,IT_STR-VTWEG,
                  IT_STR-SPART,IT_STR-KTOKD,
                  IT_STR-NAME1,IT_STR-SORTL,     
                  IT_STR-ORT01,
                  IT_STR-PSTLZ,
                  IT_STR-LAND1,      
                  IT_STR-SPRAS.
          S = S + 1.
        ENDLOOP.
    REFRESH : ITAB1.
        WRITE:/ 'TOTAL RECORDS',S.
      ENDIF.
    *--Populating the error records internal table.
      IF ITAB2[] IS NOT INITIAL.
    FORMAT COLOR 3.
        WRITE :/ 'ERRORS RECORDS ARE'.
    FORMAT COLOR OFF.
        LOOP AT ITAB2.
          WRITE:/ ITAB2-VKORG,
                  ITAB2-VTWEG,
                  ITAB2-SPART,ITAB2-KTOKD,
                  ITAB2-NAME1,ITAB2-SORTL,     
                  ITAB2-ORT01,
                  ITAB2-PSTLZ,
                  ITAB2-LAND1,      
                  ITAB2-SPRAS.
            E = E + 1.
        ENDLOOP.
    REFRESH : ITAB2.
        WRITE: / 'TOTAL RECORDS',E.
    REFRESH : ITAB2.
      ENDIF.
    End of Selection *
    END-OF-SELECTION.
    TOP-OF-PAGE *
    TOP-OF-PAGE.
      WRITE:/ SY-ULINE.
      WRITE:/10 'REPORT ID',21 SY-REPID,35 'USERNAME',46 SY-UNAME,
      60 'SYSTEM DATE',70 SY-DATUM,80 'SYSTEM TIME',90 SY-UZEIT,
      100 'PAGE NO',108 SY-PAGNO.
      WRITE:/ SY-ULINE.
    FOrm to Populate the BDC table.
           Start new screen                                              *
    FORM BDC_DYNPRO USING PROGRAM DYNPRO.
      CLEAR BDCDATA.
      BDCDATA-PROGRAM  = PROGRAM.
      BDCDATA-DYNPRO   = DYNPRO.
      BDCDATA-DYNBEGIN = 'X'.
      APPEND BDCDATA.
    ENDFORM.                    "BDC_DYNPRO
           Insert field                                                  *
    FORM BDC_FIELD USING FNAM FVAL.
      IF FVAL <> SPACE.
        CLEAR BDCDATA.
        BDCDATA-FNAM = FNAM.
        BDCDATA-FVAL = FVAL.
        APPEND BDCDATA.
      ENDIF.
    ENDFORM.                    "BDC_FIELD
    *&      Form  messages
    FORM MESSAGES .
      LOOP AT MESSTAB.
        IF MESSTAB-MSGTYP = 'I'.
         WRITE : / MESSTAB-MSGV1.
        ELSEIF
    MESSTAB-MSGTYP = 'S'.
          INSERT LINES OF ITAB FROM COUNT TO COUNT INTO TABLE ITAB1 .
          COUNT = COUNT + 1.
         WRITE : / MESSTAB-MSGV1.
        ELSEIF
        MESSTAB-MSGTYP = 'E'.
          INSERT LINES OF ITAB FROM COUNT TO COUNT INTO TABLE ITAB2.
          COUNT = COUNT + 1.
         WRITE : / MESSTAB-MSGV1.
        ENDIF.
      ENDLOOP.
    ENDFORM.                    " messages

    Hi
    Go through the doc and do the same using LSMW
    BDC is the way to transfer data by writing a batch input program which can use either session or call transaction method.
    LSMW used to transfer data without/less code.
    What type of data we transfer using LSMW?
    LSMW is best suited for transferring master data.
    Actually BDC and LSMW are not comparable at all.
    for example LSMW itself can use BDC as a way of mass data transfer.
    BDC is a mass data transfer technique via screen logic of existing SAP Data entry transactions. It behaves as if you are manually making thousand of entires into sap system as a background job. And that is probably the reason why BAPI's are preffered over BDC's.
    On the other hand LSMW is a tool to facilitate DATA migration from other legacy systems ... It contains step by step procedure for data migration.
    Like Managing Data Migration Projects , Creating Source Structures , Mapping Source structures wid Target structures , etc etc
    LSMW internally might well be using the following techniqes for data transfer..
    1. IDOX
    2. Direct Input / BDC
    4. BAPI's
    LSMW is an encapsulated data transfer tool. It can provide the same functionality as BDC infact much more but when coming to techinical perspective most the parameters are encapulated. To listout some of the differences :
    LSMW is basicaly designed for a fuctional consultant who do not do much coding but need to explore the fuctionality while BDC is designed for a technical consultant.
    LSMW offers different techinque for migrating data: Direct input ,BAPI,Idoc,Batch input recording. While bdc basically uses recording.
    LSMW mapping is done by SAP while in BDC we have to do it explicitly .
    LSMW is basically for standard SAP application while bdc basically for customized application.
    Coding can be done flexibly in BDC when compared to LSMW
    1. Maintain Attributes:
    Here you have to choose the second option and you can do the recording how this should work. Then assign the same to the Batch Input Recording name.
    2. Maintain Source structure:
    Create a structure name
    3. Maintain Source field:
    In this you have to create a structure same as that of the input file
    eg: name
    age
    4. Maintain structure relations:
    This will link the structure to the input file.
    5. Maintain field mapping and conversion rules:
    Here is the place where you can do coding, depending upon the code you have written or assignment you have done the values will get picked up from the file and get processed.
    6. Maintain field mapping and conversion rules:
    If you have any fixed values you can define here.
    7. Specify files:
    Specify the input file path and type.
    8. Assign files:
    This will assign ur file to the Input file
    9. Read Data:
    This will read ur data from teh file.
    10. Dispaly Read Data:
    You can see the uploaded data
    11. Convert Data
    This will convert the data to the corresponding format for processing
    12. Display Converted data:
    13. Create batch input session
    Here this will create a batch input session for processing
    14. Run Batch Input session:
    By clicking on the session and process the same you can do teh needfu.
    http://www.sapbrain.com/TOOLS/LSMW/SAP_LSMW_steps_introduction.html
    http://esnips.com/doc/8e732760-5548-44cc-a0bb-5982c9424f17/lsmw_sp.ppt
    http://esnips.com/doc/f55fef40-fb82-4e89-9000-88316699c323/Data-Transfer-Using-LSMW.zip
    http://esnips.com/doc/1cd73c19-4263-42a4-9d6f-ac5487b0ebcb/LSMW-with-Idocs.ppt
    http://esnips.com/doc/ef04c89f-f3a2-473c-beee-6db5bb3dbb0e/LSMW-with-BAPI.ppt
    http://esnips.com/doc/7582d072-6663-4388-803b-4b2b94d7f85e/LSMW.pdf
    for Long texts Upload
    Please take a look at this..
    http://help.sap.com/saphelp_erp2005/helpdata/en/e1/c6d30210e6cf4eac7b054a73f8fb1d/frameset.htm
    Reward points for useful Answers
    Regards
    Anji

  • Call transaction using bdc tab and also skip first screen??

    Hi,
    Please help.
    I want to call transaction PA30 fill it with values which are determined only at runtime and then skip first screen.
    The screen doesn't have parameter fields so i cannot use 'set parameter id'.
    I also cannot create a transaction with parameters as I only have these at runtime.
    Anyone done anything like this???

    hi,
      you might be populateing the itab bdc_tab with the corresponding values fronm the recording.
    while doing the recording go until to the screen wher u want to finsih.
    and populate the bdc_tab wit the ok code,screen number and the value.
    this will do.
    for eg see the code below.
    METHOD analyze_log.
      DATA : wrk_extid TYPE balhdr-extnumber.
      DATA : wrk_date(10) TYPE c.
      DATA : it_rspar TYPE TABLE OF rsparams .
      DATA : wa_rspar TYPE rsparams.
      DATA: it_bdcdata TYPE STANDARD TABLE OF bdcdata,
          wa_bdcdata TYPE bdcdata.
      DATA: params TYPE ctu_params.
      CONSTANTS : object TYPE balhdr-object VALUE 'ZKIV_LOG'.
      IF wa_kopf-vertr_nr IS NOT INITIAL.
        CONCATENATE wa_kopf-vertr_nr '/' wa_kopf-nachtr_nr  INTO wrk_extid.
        wrk_date = '01.09.2006'.
        SET PARAMETER ID 'BALOBJ' FIELD object .
        SET PARAMETER ID 'BALEXT' FIELD wrk_extid.
        wa_rspar-selname = 'ALDATE'.
        wa_rspar-sign = 'I'.
        wa_rspar-kind = 'P'.
        wa_rspar-option = 'EQ'.
        wa_rspar-low = wrk_date.
        APPEND wa_rspar TO it_rspar.
      ELSE.
        CLEAR wrk_extid.
        SET PARAMETER ID 'BALEXT' FIELD wrk_extid.
      ENDIF.
    Update BDC tab
    --Call SLG1 using BDC--&
      params-dismode = 'E'. "Show errors only
      CLEAR wa_bdcdata.
      wa_bdcdata-program  = 'SAPLSLG3'.
      wa_bdcdata-dynpro   = '0100'.
      wa_bdcdata-dynbegin = 'X'.
      APPEND wa_bdcdata TO it_bdcdata.
      CLEAR wa_bdcdata.
      wa_bdcdata-fnam = 'BDC_CURSOR'.
      wa_bdcdata-fval = 'BALHDR-ALDATE'.
      APPEND wa_bdcdata TO it_bdcdata.
      CLEAR wa_bdcdata.
      wa_bdcdata-fnam = 'BALHDR-ALDATE'.
      wa_bdcdata-fval = wrk_date.
      APPEND wa_bdcdata TO it_bdcdata.
      CLEAR wa_bdcdata.
      wa_bdcdata-fnam = 'BDC_OKCODE'.
      wa_bdcdata-fval = '=SELE'.
      APPEND wa_bdcdata TO it_bdcdata.
      CLEAR wa_bdcdata.
      wa_bdcdata-program  = 'SAPLSLG3'.
      wa_bdcdata-dynpro   = '0100'.
      wa_bdcdata-dynbegin = 'X'.
      APPEND wa_bdcdata TO it_bdcdata.
      CLEAR wa_bdcdata.
      wa_bdcdata-fnam = 'BDC_OKCODE'.
      wa_bdcdata-fval = '=&F03'.
      APPEND wa_bdcdata TO it_bdcdata.
      CLEAR wa_bdcdata.
      wa_bdcdata-fnam = 'BDC_SUBSCR'.
      wa_bdcdata-fval = 'SAPLSBAL_DISPLAY                        0101SUBSCREEN'.
      APPEND wa_bdcdata TO it_bdcdata.
      CALL TRANSACTION 'SLG1' USING it_bdcdata OPTIONS FROM params.
    --End of BDC--&
    ENDMETHOD.
    here wat i m doing is that i dont want the subscreen 101 to be displayed..
    Message was edited by:
            Sandeep S

  • Can we record two transactions and use for  a Call-transaction BDC?

    can we record two transactions and upload data using Call-transaction method in BDC ?IF not why?

    Hi Prakash,
    Here i used two transactions.
    REPORT zra_gl_cr NO STANDARD PAGE HEADING LINE-SIZE 255.
    TYPE-POOLS: truxs.
    DATA: it_raw TYPE truxs_t_text_data.
    DATA:messtab1 LIKE bdcmsgcoll OCCURS 0 WITH HEADER LINE.
    DATA:messtab LIKE bdcmsgcoll OCCURS 0 WITH HEADER LINE.
    DATA: bdcdata LIKE bdcdata OCCURS 0 WITH HEADER LINE.
    DATA: BEGIN OF i_mess OCCURS 0,
      l_mstring(480),
      msgnr(5),
      msgv1(15),
      END OF i_mess.
    DATA:i_mess1 LIKE i_mess OCCURS 0 WITH HEADER LINE.
    DATA: l_mstring(480),l_mstring1(480).
    DATA: BEGIN OF it_itab OCCURS 0,
          saknr(10),    "G/L a/c number.
          bukrs(4),     "Company Code.
          ktoks(4),     "G/L a/c group.
          xplacct(1),   "P&L statement account.
          xbilk(1),     "Balance sheet account.
          txt20_ml(20), "G/L a/c short text.
          txt50_ml(50), "G/L a/c long text.
          waers(5),     "Account currency.
          MWSKZ(2),
          mitkz(1),     "Reconciliation a/c for a/c type.
          xopvw(1),     "Open item management
          xkres(1),     "Line item display.
          zuawa(3),     "Sort Key.
          fstag(4),     "Field status group.
          xintb(1),     "Post automatically only.
          hbkid(5),     "House bank.
          hktid(5),     "Account id.
          vzskz(2),     "Interest indicator
          END OF it_itab.
    DATA: hdate LIKE sy-datum.
                          Selection Screen                       *****
    SELECTION-SCREEN BEGIN OF LINE.
    SELECTION-SCREEN COMMENT 5(15) text-103. " FOR FIELD P_FILE1.
    SELECTION-SCREEN POSITION 25.
    PARAMETERS : p_file1 LIKE rlgrap-filename.
    SELECTION-SCREEN END OF LINE.
                          Initialization                         *****
    INITIALIZATION.
                       At Selection Screen                       *****
    AT SELECTION-SCREEN ON VALUE-REQUEST FOR p_file1.
    Perform file_selection will help to select the location of the file
      PERFORM file_selection.
                       Start-Of-Selection                        *****
    START-OF-SELECTION.
    Perform data_upload will help to upload the data from the flat file
    to the internal table.
      PERFORM data_upload.
    PERFORM open_group.
       Peform bdc_upload will help to upload the data from the internal
       table into its respective fields.
    PERFORM bdc_fspo.
      PERFORM bdc_upload.
      PERFORM exp_log.
    PERFORM close_group.
       Perform display_log will prepare a log for the data that has been
       uploaded
       PERFORM display_log.
                        End-Of-Selection                           ****
    END-OF-SELECTION.
    *&      Form  file_selection
          To select the location of the file
    FORM file_selection .
      CALL FUNCTION 'WS_FILENAME_GET'
        EXPORTING
          def_filename     = ' '
          def_path         = 'C:\'
          mask             = ',.txt,.xls.'
          mode             = 'O'
          title            = 'Open a excel file'
        IMPORTING
          filename         = p_file1
        EXCEPTIONS
          inv_winsys       = 1
          no_batch         = 2
          selection_cancel = 3
          selection_error  = 4
          OTHERS           = 5.
    ENDFORM.                    " file_selection
    *&      Form  data_upload
         To upload the data from the file location to the internal table.
    FORM data_upload .
      CALL FUNCTION 'TEXT_CONVERT_XLS_TO_SAP'
        EXPORTING
        I_FIELD_SEPERATOR        =
          i_line_header            =  'X'
          i_tab_raw_data           =  it_raw
          i_filename               =  p_file1
        TABLES
          i_tab_converted_data     = it_itab
       EXCEPTIONS
          conversion_failed        = 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.
    ENDFORM.                    " data_upload
    *&      Form  bdc_upload
    To upload the data from the internal table into its respective fields.
    FORM bdc_upload .
      LOOP AT it_itab.
    perform bdc_dynpro      using 'SAPLGL_ACCOUNT_MASTER_MAINTAIN' '2001'.
    perform bdc_field       using 'BDC_OKCODE'
                                  '=ACC_CRE'.
    perform bdc_field       using 'BDC_CURSOR'
                                  'GLACCOUNT_SCREEN_KEY-SAKNR'.
    perform bdc_field       using 'GLACCOUNT_SCREEN_KEY-SAKNR'
                                  it_itab-SAKNR.
    perform bdc_field       using 'GLACCOUNT_SCREEN_KEY-BUKRS'
                                  it_itab-BUKRS.
    perform bdc_dynpro      using 'SAPLGL_ACCOUNT_MASTER_MAINTAIN' '2001'.
    perform bdc_field       using 'BDC_OKCODE'
                                  '=2102_GROUP'.
    perform bdc_field       using 'BDC_CURSOR'
                                  'GLACCOUNT_SCREEN_COA-KTOKS'.
    perform bdc_field       using 'GLACCOUNT_SCREEN_COA-KTOKS'
                                  it_itab-KTOKS.
    perform bdc_field       using 'GLACCOUNT_SCREEN_COA-XPLACCT'
                                  it_itab-XPLACCT.
    perform bdc_dynpro      using 'SAPLGL_ACCOUNT_MASTER_MAINTAIN' '2001'.
    perform bdc_field       using 'BDC_OKCODE'
                                  '=2102_BS_PL'.
    perform bdc_field       using 'BDC_CURSOR'
                                  'GLACCOUNT_SCREEN_COA-XBILK'.
    perform bdc_field       using 'GLACCOUNT_SCREEN_COA-KTOKS'
                                  it_itab-KTOKS.
    perform bdc_field       using 'GLACCOUNT_SCREEN_COA-XPLACCT'
                                 it_itab-XPLACCT.
    perform bdc_field       using 'GLACCOUNT_SCREEN_COA-XBILK'
                                  it_itab-XBILK.
    perform bdc_dynpro      using 'SAPLGL_ACCOUNT_MASTER_MAINTAIN' '2001'.
    perform bdc_field       using 'BDC_OKCODE'
                                  '=ENTER'.
    perform bdc_field       using 'GLACCOUNT_SCREEN_COA-KTOKS'
                                  it_itab-KTOKS.
    perform bdc_field       using 'GLACCOUNT_SCREEN_COA-XBILK'
                                  it_itab-XBILK.
    perform bdc_field       using 'GLACCOUNT_SCREEN_COA-TXT20_ML'
                                  it_itab-TXT20_ML.
    perform bdc_field       using 'GLACCOUNT_SCREEN_COA-TXT50_ML'
                                 it_itab-TXT50_ML.
    perform bdc_field       using 'BDC_CURSOR'
                                  'GLACCOUNT_SCREEN_COA-BILKT'.
    perform bdc_field       using 'GLACCOUNT_SCREEN_COA-BILKT'
                                  it_itab-saknr.
        PERFORM bdc_dynpro      USING 'SAPLGL_ACCOUNT_MASTER_MAINTAIN' '2001'.
        PERFORM bdc_field       USING 'BDC_OKCODE'
                                      '=TAB02'.
        PERFORM bdc_field       USING 'BDC_CURSOR'
                                      'GLACCOUNT_SCREEN_COA-KTOKS'.
        PERFORM bdc_field       USING 'GLACCOUNT_SCREEN_COA-KTOKS'
                                       it_itab-ktoks.
        PERFORM bdc_field       USING 'GLACCOUNT_SCREEN_COA-TXT20_ML'
                                       it_itab-txt20_ml.
        PERFORM bdc_field       USING 'GLACCOUNT_SCREEN_COA-TXT50_ML'
                                       it_itab-txt50_ml.
        perform bdc_field       using 'BDC_CURSOR'
                                  'GLACCOUNT_SCREEN_COA-BILKT'.
    perform bdc_field       using 'GLACCOUNT_SCREEN_COA-BILKT'
                                  it_itab-saknr.
    perform bdc_dynpro      using 'SAPLGL_ACCOUNT_MASTER_MAINTAIN' '2001'.
    perform bdc_field       using 'BDC_OKCODE'
                                  '=TAB02'.
    perform bdc_field       using 'BDC_CURSOR'
                                  'GLACCOUNT_SCREEN_COA-KTOKS'.
    perform bdc_field       using 'GLACCOUNT_SCREEN_COA-KTOKS'
                                     it_itab-KTOKS.
    perform bdc_field       using 'BDC_CURSOR'
                                  'GLACCOUNT_SCREEN_COA-KTOKS'.
    perform bdc_field       using 'GLACCOUNT_SCREEN_COA-KTOKS'
                                  it_itab-KTOKS.
    perform bdc_field       using 'GLACCOUNT_SCREEN_COA-XBILK'
                                 it_itab-XBILK.
    perform bdc_field       using 'GLACCOUNT_SCREEN_COA-TXT20_ML'
                                  it_itab-TXT20_ML.
    perform bdc_field       using 'GLACCOUNT_SCREEN_COA-TXT50_ML'
                                  it_itab-TXT50_ML.
    perform bdc_field       using 'GLACCOUNT_SCREEN_COA-BILKT'
                                 it_itab-saknr.
    perform bdc_dynpro      using 'SAPLGL_ACCOUNT_MASTER_MAINTAIN' '2001'.
    perform bdc_field       using 'BDC_OKCODE'
                                  '=ENTER'.
    perform bdc_field       using 'GLACCOUNT_SCREEN_CCODE-WAERS'
                                  it_itab-waers.
    perform bdc_field       using 'GLACCOUNT_SCREEN_CCODE-MWSKZ'
                                  it_itab-MWSKZ.
    perform bdc_field       using 'GLACCOUNT_SCREEN_CCODE-MITKZ'
                                  it_itab-mitkz.
    perform bdc_field       using 'BDC_CURSOR'
                                  'GLACCOUNT_SCREEN_CCODE-XOPVW'.
    perform bdc_field       using 'GLACCOUNT_SCREEN_CCODE-XOPVW'
                                  it_itab-XOPVW.
    perform bdc_field       using 'GLACCOUNT_SCREEN_CCODE-XKRES'
                                  it_itab-XKRES.
    perform bdc_field       using 'GLACCOUNT_SCREEN_CCODE-ZUAWA'
                                 it_itab-ZUAWA.
        PERFORM bdc_field       USING 'GLACCOUNT_SCREEN_COA-XPLACCT'
                                       it_itab-xplacct.
        PERFORM bdc_field       USING 'GLACCOUNT_SCREEN_COA-XBILK'
                                       it_itab-xbilk.
           IF it_itab-xbilk = 'X'.
       PERFORM bdc_dynpro USING 'SAPLGL_ACCOUNT_MASTER_MAINTAIN' '2001'.
       PERFORM bdc_field       USING 'BDC_OKCODE'
                                     '=TAB03'.
       PERFORM bdc_field       USING 'BDC_CURSOR'
                                     'GLACCOUNT_SCREEN_CCODE-WAERS'.
       PERFORM bdc_field       USING 'GLACCOUNT_SCREEN_CCODE-WAERS'
                                      it_itab-waers.
         PERFORM bdc_field USING 'GLACCOUNT_SCREEN_CCODE-XOPVW'
                                  it_itab-xopvw.
         PERFORM bdc_field USING 'GLACCOUNT_SCREEN_CCODE-MITKZ'
                                  it_itab-mitkz.
       ENDIF.
       PERFORM bdc_field       USING 'GLACCOUNT_SCREEN_CCODE-XKRES'
                                      it_itab-xkres.
       PERFORM bdc_field       USING 'GLACCOUNT_SCREEN_CCODE-ZUAWA'
                                      it_itab-zuawa.
       PERFORM bdc_dynpro      USING 'SAPLGL_ACCOUNT_MASTER_MAINTAIN' '2001'.
       PERFORM bdc_field       USING 'BDC_OKCODE'
                                     '=SAVE'.
       PERFORM bdc_field       USING 'BDC_CURSOR'
                                     'GLACCOUNT_SCREEN_CCODE-FSTAG'.
       PERFORM bdc_field       USING 'GLACCOUNT_SCREEN_CCODE-FSTAG'
                                      it_itab-fstag.
       PERFORM bdc_field       USING 'GLACCOUNT_SCREEN_CCODE-XINTB'
                                      it_itab-xintb.
       PERFORM bdc_field       USING 'GLACCOUNT_SCREEN_CCODE-HBKID'
                                      it_itab-hbkid.
       PERFORM bdc_field       USING 'GLACCOUNT_SCREEN_CCODE-HKTID'
                                      it_itab-hktid.
       PERFORM bdc_field       USING 'GLACCOUNT_SCREEN_CCODE-VZSKZ'
                                      it_itab-vzskz.
    perform bdc_dynpro      using 'SAPLGL_ACCOUNT_MASTER_MAINTAIN' '2001'.
    perform bdc_field       using 'BDC_OKCODE'
                                  '=TAB03'.
    perform bdc_field       using 'BDC_CURSOR'
                                  'GLACCOUNT_SCREEN_CCODE-WAERS'.
    perform bdc_field       using 'GLACCOUNT_SCREEN_CCODE-WAERS'
                                  it_itab-WAERS.
    perform bdc_field       using 'GLACCOUNT_SCREEN_CCODE-MWSKZ'
                                  it_itab-MWSKZ.
    perform bdc_field       using 'GLACCOUNT_SCREEN_CCODE-MITKZ'
                                  it_itab-MITKZ.
    perform bdc_field       using 'GLACCOUNT_SCREEN_CCODE-ZUAWA'
                                 it_itab-ZUAWA.
    perform bdc_dynpro      using 'SAPLGL_ACCOUNT_MASTER_MAINTAIN' '2001'.
    perform bdc_field       using 'BDC_OKCODE'
                                  '=ENTER'.
    perform bdc_field       using 'BDC_CURSOR'
                                  'GLACCOUNT_SCREEN_CCODE-FSTAG'.
    perform bdc_field       using 'GLACCOUNT_SCREEN_CCODE-FSTAG'
                                 it_itab-FSTAG.
    perform bdc_dynpro      using 'SAPLGL_ACCOUNT_MASTER_MAINTAIN' '2001'.
    perform bdc_field       using 'BDC_OKCODE'
                                  '=SAVE'.
    perform bdc_field       using 'BDC_CURSOR'
                                  'GLACCOUNT_SCREEN_CCODE-FSTAG'.
    perform bdc_field       using 'GLACCOUNT_SCREEN_CCODE-FSTAG'
                                  it_itab-FSTAG.
       PERFORM bdc_transaction USING 'FS00'.
        CALL TRANSACTION 'FS00' USING bdcdata MODE 'A'
                                              UPDATE 'S'
                                             MESSAGES  INTO messtab1.
        PERFORM mess1.
        REFRESH bdcdata[].
      ENDLOOP.
    ENDFORM.                    " bdc_upload
    *&      Form  bdc_fspo
          text
    FORM bdc_fspo .
      LOOP AT it_itab.
        PERFORM bdc_dynpro      USING 'SAPLGL_ACCOUNT_MASTER_MAINTAIN' '2001'.
        PERFORM bdc_field       USING 'BDC_OKCODE'
                                      '=ACC_CRE'.
        PERFORM bdc_field       USING 'BDC_CURSOR'
                                      'GLACCOUNT_SCREEN_KEY-SAKNR'.
        PERFORM bdc_field       USING 'GLACCOUNT_SCREEN_KEY-SAKNR'
                                      it_itab-saknr.
        PERFORM bdc_field       USING 'GLACCOUNT_SCREEN_KEY-KTOPL'
                                      '1000'.
        PERFORM bdc_dynpro      USING 'SAPLGL_ACCOUNT_MASTER_MAINTAIN' '2001'.
        PERFORM bdc_field       USING 'BDC_OKCODE'
                                      '=2102_GROUP'.
        PERFORM bdc_field       USING 'BDC_CURSOR'
                                      'GLACCOUNT_SCREEN_COA-KTOKS'.
        PERFORM bdc_field       USING 'GLACCOUNT_SCREEN_COA-KTOKS'
                                      it_itab-ktoks.
        PERFORM bdc_field       USING 'GLACCOUNT_SCREEN_COA-XPLACCT'
                                       it_itab-xplacct.
        PERFORM bdc_field       USING 'GLACCOUNT_SCREEN_COA-XBILK'
                                      it_itab-xbilk.
        PERFORM bdc_dynpro      USING 'SAPLGL_ACCOUNT_MASTER_MAINTAIN' '2001'.
        PERFORM bdc_field       USING 'BDC_OKCODE'
                                      '=SAVE'.
        PERFORM bdc_field       USING 'GLACCOUNT_SCREEN_COA-KTOKS'
                                       it_itab-ktoks.
        PERFORM bdc_field       USING 'GLACCOUNT_SCREEN_COA-XPLACCT'
                                       it_itab-xplacct.
        PERFORM bdc_field       USING 'BDC_CURSOR'
                                      'GLACCOUNT_SCREEN_COA-TXT50_ML'.
        PERFORM bdc_field       USING 'GLACCOUNT_SCREEN_COA-TXT20_ML'
                                       it_itab-txt20_ml.
        PERFORM bdc_field       USING 'GLACCOUNT_SCREEN_COA-TXT50_ML'
                                       it_itab-txt50_ml.
    *perform bdc_transaction using 'FSP0'.
        CALL TRANSACTION 'FSP0' USING bdcdata MODE 'A'
                                              UPDATE 'S'
                                             MESSAGES  INTO messtab.
        PERFORM mess.
        REFRESH bdcdata[].
      ENDLOOP.
    ENDFORM.                    " bdc_fspo
    *&      Form  mess
          text
    -->  p1        text
    <--  p2        text
    FORM mess .                                                 "fsp0
      LOOP AT messtab.
        CALL FUNCTION 'FORMAT_MESSAGE'
          EXPORTING
            id        = messtab-msgid
            lang      = messtab-msgspra
            no        = messtab-msgnr
            v1        = messtab-msgv1
            v2        = messtab-msgv2
            v3        = messtab-msgv3
            v4        = messtab-msgv4
          IMPORTING
            msg       = l_mstring
          EXCEPTIONS
            not_found = 1
            OTHERS    = 2.
        CONDENSE l_mstring.
        i_mess1-l_mstring = l_mstring(250).
        i_mess1-msgnr = messtab1-msgnr.
        i_mess1-msgv1 = messtab1-msgv1.
        APPEND i_mess1.
      ENDLOOP.
    ENDFORM.                    " mess
    *&      Form  mess1
          text
    -->  p1        text
    <--  p2        text
    FORM mess1 .                                                "fs00
      LOOP AT messtab1.
        CALL FUNCTION 'FORMAT_MESSAGE'
          EXPORTING
            id        = messtab1-msgid
            lang      = messtab1-msgspra
            no        = messtab1-msgnr
            v1        = messtab1-msgv1
            v2        = messtab1-msgv2
            v3        = messtab1-msgv3
            v4        = messtab1-msgv4
          IMPORTING
            msg       = l_mstring1
          EXCEPTIONS
            not_found = 1
            OTHERS    = 2.
        CONDENSE l_mstring1.
        i_mess-l_mstring = l_mstring1(250).
        i_mess-msgnr = messtab1-msgnr.
        i_mess-msgv1 = messtab1-msgv1.
        APPEND i_mess.
      ENDLOOP.
    ENDFORM.                                                    " mess1
    *&      Form  exp_log
          text
    -->  p1        text
    <--  p2        text
    FORM exp_log .
      CALL FUNCTION 'GUI_DOWNLOAD'
        EXPORTING
          filename = 'c:\temp\error_fsp0.txt'
          filetype = 'DAT'
        TABLES
          data_tab = i_mess1.
      CALL FUNCTION 'GUI_DOWNLOAD'
        EXPORTING
          filename = 'c:\temp\error_fs00.txt'
          filetype = 'DAT'
        TABLES
          data_tab = i_mess.
    ENDFORM.                    " exp_log
    *&      Form  bdc_dynpro
          text
         -->PROGRAM    text
         -->DYNPRO     text
    FORM bdc_dynpro USING program dynpro.
      CLEAR bdcdata.
      bdcdata-program  = program.
      bdcdata-dynpro   = dynpro.
      bdcdata-dynbegin = 'X'.
      APPEND bdcdata.
    ENDFORM.                    "BDC_DYNPRO
           Insert field                                                  *
    FORM bdc_field USING fnam fval.
      CLEAR bdcdata.
      bdcdata-fnam = fnam.
      bdcdata-fval = fval.
      APPEND bdcdata.
    ENDFORM.                    "BDC_Field
    ********Rewards some points.

  • Mutiple transcation update using bdc

    Dear Gurus
    I have two questions .
    1. Can we update two transaction code using CALL TRANSACTION method in BDC?
    through searching in the forum i found that it not possible to update multiple transaction using CALL TRANSACTION method to update two t code simultaneously i have to use BDC session method , because CALL TRANSACTION method uses Asynchronous method for update data.
    2.Suppose I am updating  multiple transaction code using session method at first i create sales order using va01 when sales order is created  how i collect  this sales order no to use in the second t code in session method.
    Thanks in advance.
    Chitta Ranjan

    mahato123 wrote:
    through searching in the forum i found that it not possible to update multiple transaction using CALL TRANSACTION method to update two t code simultaneously i have to use BDC session method , because CALL TRANSACTION method uses Asynchronous method for update data.
    Don't know where you got this, but it's definitely possible to update using multiple transactions sequentially.
    Rob

  • How to save long text for IA01 Transaction using BDC

    Hi All,
    In my requirement I have to create a Task List Equipment and Task List Functional Location using BDC.Here I need to upload the long text for both IA01 and IA11 transactions.I am using SAVE_TEXT function module to save the text and COMMIT_TEXT also after save text.But I am not able to see the text in IA12 and IA02 transactions.But using READ_TEXT I am able to get the text what updated using SAVE_TEXT.
    Please answer for this if any one worked on this requirement <Priority normalized by moderator>
    Thanks,
    Satya.
    Edited by: Vinod Kumar on Jan 2, 2012 9:02 PM

    Hi Satya,
    There is a simple way to update the long text. There is  direct input object in the LSMW for long text.
    Object            : 0001
    Method          : 0001
    Program type : D
    SImply go and create the LSMW with first option and follow the steps. No need to call the function modules separately. This standard program will take care of every thing.
    If you have multiple lines to populate in the equipment master at the header level then you need two set of files. Then key will be equipment number with leading zeros if it will not be alpha numeric.
    1) First file with field EQUNR.
    2) Second file will be
    EQUNR                          C(018)    Technical identification number
    TXPARGRAPH                     C(002)    Tag column
    TXLINE                         C(072)    Text editor text line
    TEXT_MARK                      C(001)    Description Indicator for RIIBIP00 (IBIP) Processing
    Please let me know if you need more in detail.
    Thanks,
    Satheesh

  • How to Change Sold to using BDC transaction after perform the order

    After creating an auto new sales order how will i change the sold to and ship to a new order before saving.
    Here sample code:
    perform load_orders.
        CALL TRANSACTION  'VA41' USING itab_bdc
         MODE p_mode UPDATE 'S'
         MESSAGES INTO bdcmsg
    thanks,
    Mary

    Hi,
    Why don't you try to make the Partner Function for Sold to Party as Modifible (Don't select Non Modifible) for the Sales Order Header in partner determination determintaion setting in customizing.
    You have to check with the partner determination procedure assigned to your sales order type and check accordingly.
    Reward points if it helps.
    Regards,
    Harsh

  • How to update transaction data automatically into MySQL database using PI

    Dear All,
    With reference to subject matter I want a sincere advice regarding how to update transaction data automatically into MySQL database using PI. Is there any link available where I can get step-by-step process.
    Ex: I have a MYSQL database in my organization. Whenever a delivery created in SAP some fields like DO Number, DO quantity, SO/STO number should get updated in MYSQL database automatically.
    This scenario is related to updation of transactional data into MYSQL DB and I want your suggestions pertaining to same issue.
    Thanks and Regards,
    Chandra Sekhar

    Hi .
    Develop a sceanrio between SAP to Database system,When the data updates in SAP Tables read the data and update it in DATA Base using JDBC adapter,but there will be some delay in updating data in MySQL.
    serach in sdn for IDOC-TOJDBC sceannario,many documents available for the same.
    Regards,
    Raja Sekhar

  • How to Increment the Page in transaction using BDC program

    Hi Friends,
    I am facing Page up problem in BDC program,
    In CT02 transaction, we have to upload mass data for the characterisitic, in the screen we can able to upload 7 rows (actually 7 rows ar there in the transaction) even after doing the Page up (P+) in the BDC, still that overwirtes in the existing rows. How to solve this issue.
    Thanks in advance.
    Here i have attached the Program, For you reference.
      LOOP AT ITAB.
        ATNAME = ITAB-ATNAM.
        perform bdc_dynpro      using 'SAPMCTAV' '0100'.
        perform bdc_field       using 'BDC_CURSOR'
                                      'CABN-ATNAM'.
        perform bdc_field       using 'BDC_OKCODE'
                                      '=WERT'.
        perform bdc_field       using 'CABN-ATNAM'
                                       ITAB-ATNAM.
        rows = counter MOD 7.
        IF rows EQ 0.
          PERFORM bdc_dynpro      using 'SAPLCTMV' '0200'.
          PERFORM bdc_field       USING 'BDC_OKCODE' 'P+'.
          counter = '02'.
          PERFORM bdc_dynpro      using 'SAPLCTMV' '0200'.
        ENDIF.
        CONCATENATE 'CAWNT-ATWTB(' COUNTER ')' INTO var.
        CONCATENATE 'CAWN-ATWRT(' COUNTER ')' INTO var1.
        perform bdc_dynpro      using 'SAPLCTMV' '0200'.
        perform bdc_field       using 'BDC_CURSOR'
                                       var.
        perform bdc_field       using 'BDC_OKCODE'
                                      '=SICH'.
        perform bdc_field       using var
                                      ITAB-ATWTB.
        perform bdc_field       using var1
                                      ITAB-ATWRT.
        COUNTER = COUNTER + '01'.
        opt-defsize = 'X'.
        opt-dismode = 'A'.
        opt-updmode = 'S'.
        CALL TRANSACTION 'CT02' USING
        bdcdata OPTIONS FROM opt MESSAGES
        INTO it_mess.
        REFRESH bdcdata.
      ENDLOOP.
    Regards
    Shankar

    Hi Geeta Yash,
    Thanks for ur timely help.
    But we have done it thro 'P+'
    Thanks.
    Shankar

  • Flat  file to upload data using BDC for transaction MM01

    Hi
    I am trying to update data using bdc code has been attached below using a txt file.
    It is updating the first set of data into the table mara ,but  for the rest it is not
    All the data from txt file has being loaded to internal table , but the problem is it does not gets updated from internal table to the database .
    Only the first set of data has been loaded ,<u><b> rest of the data is not loaded</b></u>
    <u><b>content of txt file</b></u>
    zsc     zsc     kg     
    zsv     zsv     kg     
    zsb     zsb     kg
    <u><b>Actual code</b></u>
    report ZMAT_UPLOAD
           no standard page heading line-size 255.
    types declaration..........................................................................
    types : begin of t_mat,
       matnr(20),
       desc(50),
       uom(5),
    end of t_mat.
    internal table and workarea declaration.......................................
    data : i_mat type table of t_mat.
    data : wa_mat type t_mat.
    include bdcrecx1.
    start-of-selection.
    moving the flat file content to internal table................................
    CALL FUNCTION 'UPLOAD'
         EXPORTING
             FILETYPE   = 'DAT'
         TABLES
             data_tab   = i_mat.
    IF sy-subrc <> 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
            WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
    ENDIF.
    perform open_group.
    loop at i_mat into wa_mat.
    perform bdc_dynpro      using 'SAPLMGMM' '0060'.
    perform bdc_field       using 'BDC_CURSOR'
                                       'RMMG1-MATNR'.
    perform bdc_field       using 'BDC_OKCODE'
                                        '=AUSW'.
    perform bdc_field       using 'RMMG1-MATNR'
                                        wa_mat-matnr.
    perform bdc_field       using 'RMMG1-MBRSH'
                                        'P'.
    perform bdc_field       using 'RMMG1-MTART'
                                        'ZOH'.
    perform bdc_dynpro   using 'SAPLMGMM' '0070'.
    perform bdc_field       using 'BDC_CURSOR'
                                        'MSICHTAUSW-DYTXT(01)'.
    perform bdc_field       using 'BDC_OKCODE'
                                        '=ENTR'.
    perform bdc_field       using 'MSICHTAUSW-KZSEL(01)'
                                        'X'.
    perform bdc_dynpro   using 'SAPLMGMM' '4004'.
    perform bdc_field       using 'BDC_OKCODE'
                                        '=BU'.
    perform bdc_field       using 'MAKT-MAKTX'
                                        wa_mat-desc.
    perform bdc_field       using 'BDC_CURSOR'
                                        'MARA-MEINS'.
    perform bdc_field       using 'MARA-MEINS'
                                        wa_mat-uom.
    perform bdc_field       using 'MARA-MTPOS_MARA'
                                        'NORM'.
    perform bdc_transaction using 'MM01'.
    endloop.
    Perform close_group.

    Hi Sumant,
    just concentrate on bold one
    report ZMAT_UPLOAD
    no standard page heading line-size 255.
    types declaration..........................................................................
    <b>
    data : begin of t_mat occurs 0,
    matnr(20),
    desc(50),
    uom(5),
    end of t_mat.</b>
    internal table and workarea declaration.......................................
    <b>*data : i_mat type table of t_mat.
    *data : wa_mat type t_mat.</b>
    include bdcrecx1.
    start-of-selection.
    moving the flat file content to internal table................................
    CALL FUNCTION 'UPLOAD'
    EXPORTING
    FILETYPE = 'DAT'
    TABLES
    <b>data_tab = i_mat.---> t_mat.</b>
    IF sy-subrc <> 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
    WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
    ENDIF.
    perform open_group.
    <b>loop at i_mat into wa_mat.------>loop at t_mat.</b>
    perform bdc_dynpro using 'SAPLMGMM' '0060'.
    perform bdc_field using 'BDC_CURSOR'
    'RMMG1-MATNR'.
    perform bdc_field using 'BDC_OKCODE'
    '=AUSW'.
    perform bdc_field using 'RMMG1-MATNR'
    <b>wa_mat-matnr.---->t_mat-matnr(change in this for ur wa to t_mat.</b>
    perform bdc_field using 'RMMG1-MBRSH'
    'P'.
    perform bdc_field using 'RMMG1-MTART'
    'ZOH'.
    perform bdc_dynpro using 'SAPLMGMM' '0070'.
    perform bdc_field using 'BDC_CURSOR'
    'MSICHTAUSW-DYTXT(01)'.
    perform bdc_field using 'BDC_OKCODE'
    '=ENTR'.
    perform bdc_field using 'MSICHTAUSW-KZSEL(01)'
    'X'.
    perform bdc_dynpro using 'SAPLMGMM' '4004'.
    perform bdc_field using 'BDC_OKCODE'
    '=BU'.
    perform bdc_field using 'MAKT-MAKTX'
    wa_mat-desc.
    perform bdc_field using 'BDC_CURSOR'
    'MARA-MEINS'.
    perform bdc_field using 'MARA-MEINS'
    wa_mat-uom.
    perform bdc_field using 'MARA-MTPOS_MARA'
    'NORM'.
    perform bdc_transaction using 'MM01'.
    endloop.
    Perform close_group.
    Reward points for helpful answers.
    Thanks
    Naveen khan
    Message was edited by:
            Pattan Naveen
    Message was edited by:
            Pattan Naveen

Maybe you are looking for