Call transaction for pop2.need to create packing instructions for materials

while assigning  packing instruction to the materials from table mara.
its unable to create a new line item in the screen. ex: only 8 records are saved
but needs to proceed for other materials increasing the line item no.
options of create new material ( ok code'=INLI', , create new entry('=INMA')
and even tried for page down option '=P++'. is not working.
Can anyone help me in creating more than 100 line items.
Thanks in Advance,
Sushma

Hi,
Why do you want to create the varient for this?
what is your actual requirment?
Regards,
Sachin

Similar Messages

  • Call transaction for less than 10,000 records

    Hi all
    Is call transaction advisable for processing less than 10,000 records.
    I want to use call transaction for each record and if it fails, pass it to an opened bdc session for manual processing by functional consultants. At the same time, I have to write a report with successful and errored records. Is my approach the only way? Any other ideas are welcome and appreciated
    Thanks
    ricky

    Its completely safe.
    Check the return table for all message type E and then recreate your Error table and pass it to BDC open session and can be executed from SM35 in foreground mode. But what happen if there are more say 100 or 200 error records are there.Its not feasible to go and run each record in Foreground mode.Instead Display the error records in an editable ALV with the error message trap from the CALL Transaction return table and let the consultant correct then on the screen and download it, modify it to suit the upload procedure of your report. Then reprocess the file.
    Also, display the audit report based on that table.
    Regards,
    Amit

  • Can any body tell me what is the need of creating shipping Instruction

    Hi Everybody,
    Can any body tell me what is the need of creating shipping Instruction in Material Management & where it is used.
    Menu path -> IMG -> Material Management -> Purchasing - > Material Master - > Define Shipping instruction.
    2. What is the use of Manufacturer Part Profile & how it is used in the SAP system.
    Menu path -> IMG -> Material Management -> Purchasing - > Material Master - > Define Manufacturer Part Profile.
    Thanks & Regds.....
    Rashmi

    This characteristic describes the packaging and shipping requirements that have to be fulfilled by the vendor
    The instructions issued to a vendor regarding the shipment or packing of ordered goods.
    o     CO coil
    o     NE unpacked
    o     NT nylon net
    A manufacturer part profile contains indicators and control parameters, which define the conditions for using (inventory-managed or non-inventory-managed) manufacturer parts in the procurement process.
    The manufacturer part profile specifies how manufacturer parts (MPN materials) can be used in the procurement process.
    The manufacturer part profile is assigned to the master record for a firm's own inventory-managed material.
    Among other things, it determines whether:
    u2022     The MPN material or the inventory-managed material is to be entered in a purchase order
    u2022     Info records can be created for the MPN material or the firm's own material
    u2022     The MPN material can be changed during the procurement process

  • Creating packing instructions.

    Good day!
      Can somebody show me an example of using FM VHUPO_PACK_INSTRUCTION_CREATE or a method PiCreate of BAPI BUS3071 to create packing instruction. I can't understand what obligatory fields I need to fill to have success.
    Thanks an avance.
                                                           Anton Griga

    I have solved a problem. Thread closing...
    Here is a solution:
    wa_pikp-tare_vol_unit = wa_pikp-vol_unit.
        wa_pikp-max_unit_of_wght = 'KG'.
        wa_pikp-unit_of_wt = 'KG'.
        wa_pikp-total_vol = wa_pikp-load_vol + wa_pikp-tare_vol.
        wa_pikp-total_wght = wa_pikp-load_wght + wa_pikp-tare_wght.
        SELECT SINGLE
          ergew
          ervol
          FROM mara
          INTO (wa_pikp-allowed_wght,wa_pikp-allowed_vol)
          WHERE matnr = 'PALLET'.
        wa_pikp-check_profile = '01'.
        wa_pikp-vol_fix = 'X'.
        wa_pikp-weight_fix = 'X'.
        "Filling positions to packing instruction
        TRANSLATE lsmw_accmat-kg_v_palete USING ',.'.
        FREE wa_pipositions.
        wa_pipositions-item_number = 10.
        wa_pipositions-detail_itemtype = 'P'.
        wa_pipositions-material = 'PALLET'.
        wa_pipositions-target_qty = 1.
        wa_pipositions-load_carrier_indicator = 'X'.
        wa_pipositions-unit_qty = 'ST'.
        APPEND wa_pipositions TO pipositions.
        FREE wa_pipositions.
        wa_pipositions-item_number = 20.
        wa_pipositions-detail_itemtype = 'M'.
        wa_pipositions-material = iv_matnr.
        wa_pipositions-target_qty = iv_qty.
        wa_pipositions-minimum_qty = 1.
        wa_pipositions-unit_qty = 'KI'.
        APPEND wa_pipositions TO pipositions.
        CALL FUNCTION 'BAPI_HU_PI_CREATE'
          EXPORTING
            header           = wa_pikp
       IMPORTING
         HEADER_EXT       =
         PIKEY            =
          TABLES
            positions        = pipositions
            return           = piret
        IF NOT piret IS INITIAL .
          LOOP AT piret INTO wa_piret.
            WRITE / wa_piret-message.
          ENDLOOP.
        ENDIF.
        CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'.
        WAIT UP TO 1 SECONDS.
        SELECT SINGLE packnr
          FROM packkp
          INTO i_packnr
          WHERE pobjid = wa_pikp-packinstrid.
        IF sy-subrc = 0.
          objname_up = lsmw_accmat-obj_name.
          TRANSLATE objname_up TO UPPER CASE.
          wa_packkps-packnr = i_packnr.
          wa_packkps-spras = sy-langu.
          wa_packkps-content = lsmw_accmat-obj_name.
          wa_packkps-content_up = objname_up.
          INSERT into packkps values wa_packkps.
          IF sy-subrc = 0.
            WRITE / 'Texts have been added'.
          ENDIF.
        ENDIF.

  • BAPI or FM for HU create Packing Instructions

    Can Anyone plz tell me any BAPI or Function Module to create HU from Packing INstructions.
    Many Thanks
    Edited by: Hiren N. Panchal on Feb 7, 2011 9:50 AM

    Thanks Abhijeet for mentioning both the BAPIs.
    I am already aware of both these BAPIs, But I want to create HU during Goods Receipt Production Order & there I need to create an HU wrt Packing INstructions & pack the contents from Receipt of Production Order.
    PLz tell me any bapi which can create HU & perform packing by passing PAcking Instructions will be very much helpful & also it will eliminate 2 steps of BAPI HU Create & BAPI HU Pack.
    MAny Thanks once again..!!

  • Substitution of FI fields on call transactions for clearing.

    Dear collegues,
    I need help to configure a substitution for tx. FBWD-returned/paid Bills of exchange were the baseline date of the clearing account for the bill liability at the bank (that has the due date as required) and has to be substituted with the entry in value date field.
    FBWD calls tx FB05 to post the cleared BOE and the clearing account for BOE is posted on 2nd position (BSEG-BUZEI= '002') under these tx. That's why I configured the following substitution that it is not working:
    Prerequisite
    ( BKPF-TCODE = 'fbwd' OR BKPF-TCODE = 'zfbw' OR
    BKPF-TCODE = 'fb05' ) AND BKPF-BLART = 'AB' AND
    BSEG-BUZEI = '002'
    Substitution if prerequisite is met:
    Field                  is substituted by:
    Baseline Date          Field             BSEG-VALUT
    Why doesn't it work: because of the call transaction, being clearing tx., incorrect code, need for a exit...
    Can somebody assist? Thanks in advance.
    Regards,
    Abdali

    Hello,
    This is a rather complex topic. The general principle is that no one should have authorizations for the complete process, from beginning to the end. Good place to start is [here|http://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/f02855c9-2091-2a10-8682-af41abe087ba].
    SAP provides report, which can be configured by the customer, namely [RSUSR008_009_NEW|http://help.sap.com/saphelp_nw04s/helpdata/en/f9/558f40f3b19920e10000000a1550b0/content.htm]- Users with critical authorizations.
    Regards,
    Milen.
    Edited by: Milen G on Sep 10, 2010 8:00 AM

  • Error 00-341 RAISE_EXCEPTION when using Call Transaction for VA01 in backgr

    Hi,
    I am getting this message when I use call transaction to create a sales order using VA01. Following is the statement I have used.  Note that when i execute the program online, I am not getting any errors. I could create sales order without any problem. I am getting this exception only when I run in background.
          CALL TRANSACTION 'VA01'
                     USING BDC_TAB
                      MODE 'N'
                    UPDATE 'S'
             MESSAGES INTO W_MESS_TAB.
    When I captured message tab, I got following messages.
    DC006 - Control Framework: Fatal error - GUI cannot be reached
    00341 Runtime error RAISE_EXCEPTION has occurred.
    Please help me in this regard.
    Regards
    Kasi

    Some times execution of BDC program in back ground is different from the foreground. Some screens may appear in background and raise error while same will not when executed in foreground.
    Double click the message in Session log to know more details.
    One way is to suppress the screen while executing BDC.
    Alternatively I suggest to use BAPI instead.
    - Sanjay

  • Tracing of message in Status Bar using Call Transaction for MRBR

    Hi
    As per the business requirement, I would like to automate the MRBR Transaction. I am achieving this by using Call Transaction. After aaplying certain company codes as an i/p; i receive the invoices as an o/p in a ALV Lay out. Say for example, 100 invoices are displayed in a AlV Lay-out after applying i/p. Now I select all these 100 invoices and release them.
    All these steps are recorded and supplied to Call Transaction via BDC table.
    Problem:
    The number of invoices released, appear in the status bar of that ALV Lay-out screen. This message appears on the ALV screen after I have released the invoices and clicked on "SAVE" button.I would like to use this information and display this number (No. of Invoices released) in my Job Log. But I do not know how to do it. Could any one help me out for this?
    Thanks in advance,
    Jigar Shah.

    Yes I have tried that option as well.
    But the thing is, the recording gets over as soon as I click on "SAVE" button.And that message apperas in status bar only after I click on "SAVE" button.So this way the message in the status bar never gets recorded.
    Thanks & Regards,
    Jigar Shah.

  • Need to create a report: all materials in one storage location incl. value

    Hello,
    we have the requirement to create a report: all materials in one storage location incl. value.
    What are the database-tables we need to use in the report?
    Is there a standard transaction which shows all materials on one storage location?
    Thanks a lot.
    Kind regards
    Manfred

    Hello,
    MB52 is ok - but not good performance.
    What are the important tables we need to join in an own report?
    Kind regards
    Manfred

  • Issue in background job for call transaction

    Dear All,
    I am facing a strange issue with call transaction. I need to add some Purchase requisitons in the APO using Call transactionmethod. It is working fine In All screen mode and No Screen Mode. But when I schedule the program in BAckground processing it is not wokring fine. It is not creating any Purchase requisitioins. When I debug the background Job it is creating Purchase requisitions.
    Please find the code below
        DATA: l_wa_params TYPE ctu_params.
        l_wa_params-dismode = l_c_mode.
        l_wa_params-updmode = 'A'.
        l_wa_params-defsize = 'X'.
        l_wa_params-racommit = 'X'.
        CALL TRANSACTION '/SAPAPO/RRP3' USING fp_i_bdcdata OPTIONS FROM l_wa_params
                                            MESSAGES INTO l_i_bdcmsgcoll.

    Hi,
    I have exactly the same problem with transaction /SAPAPO/RRP5.
    Thanks in advance for your help,
    Yannick CAREL

  • FB05 Batch Input / Call Transaction - Does not select amount for payment

    Hi,
    When I launch the FBWD transaction (returned bills of exchange), the call transaction for G/L account postings is in error. So the FBWD automatically creates a batch input, but when I tried to launch the batch input, it remains unsuccessful.
    So I launched the BI in foreground, I can see that the first steps of the account postings are OK, but the BI stops when assigning the payment amounts : the BI found the different postings to clear, but it waits to enter the payment amount.
    Manually, I just have to click on 'Accept' or enter the payment amount and click on 'Continue'.
    => Is there anything to do so that there is no payment amount to fill? (there should be something because the FBWD is a standard transaction, so it should work!!)
    Can you help me on this?
    Thx

    Hi.
    Yes the issue has been resolved.
    You just have to configure your master record (FS00) by ticking the box 'relevant to cash flow' (XGKON).
    Hope it will help you.
    Bernard.

  • Catching Errors in Call Transaction

    Hi All,
    I have develop the BDC using call transaction for MM01 transaction but i need to catch the success messages as well as errors in a log file that i wanna download. below is the code for the same and is it mandatory to give the update mode.please let me know.
    DATA: i_bdcdata TYPE bdcdata OCCURS 0 WITH HEADER LINE,
          i_error TYPE bdcmsgcoll OCCURS 0 WITH HEADER LINE.
        PARAMETERS: p_file TYPE rlgrap-filename OBLIGATORY,
                p_mode(1) DEFAULT 'A'.
               p_erfile TYPE rlgrap-filename.
    SELECTION-SCREEN : BEGIN OF BLOCK BLK1 WITH FRAME TITLE TEXT-001.
    PARAMETER: PBROW_HD TYPE I, PEROW_HD TYPE I, PBCOL_HD TYPE I, PECOL_HD TYPE I.
    SELECTION-SCREEN : END OF BLOCK BLK1.
    DATA: T_EXCEL LIKE ALSMEX_TABLINE OCCURS 0 WITH HEADER LINE.
    Data: begin of record occurs 0,
          MATNR(40),
          MBRSH(01),
          MTART(04),
          MAKTX(40),
          MEINS(03),
          MATKL(09),
          BISMT(18),
          UMREN_02(05),
          UMREN_03(05),
          MEINH_02(03),
          MEINH_03(03),
          UMREZ_02(05),
          UMREZ_03(05),
          WERKS(04),
          EKGRP(3) ,
          LGORT(04),
          DISMM(02),
          DISPO(03),   "Cash Discount Indicator
          DISLS(02),
          BESKZ(1),
          DZEIT(3),
          FHORI(3),
          PERKZ(1),
          MTVFP(02),
          IPRKZ(01),
          END OF RECORD.
          DATA: v_filename LIKE RLGRAP-FILENAME.
    AT SELECTION-SCREEN ON VALUE-REQUEST FOR p_file.
    PERFORM read_file CHANGING p_file.
    CALL FUNCTION 'F4_FILENAME'
    * EXPORTING
    * PROGRAM_NAME = SYST-CPROG
    * DYNPRO_NUMBER = SYST-DYNNR
    * FIELD_NAME = ' '
    IMPORTING
    FILE_NAME = P_FILE.
    start-of-selection.
      PERFORM upload_file.
      PERFORM bdc
    PERFORM error_download
    FORM UPLOAD_FILE .
    CALL FUNCTION 'ALSM_EXCEL_TO_INTERNAL_TABLE'
    EXPORTING
    filename = p_file
    i_begin_col = PBCOL_HD
    i_begin_row = PBROW_HD
    i_end_col =  PECOL_HD
    i_end_row = PEROW_HD
    TABLES
    intern = T_EXCEL
    EXCEPTIONS
    inconsistent_parameters = 1
    upload_ole = 2
    OTHERS = 3.
    LOOP AT T_EXCEL.
    CASE T_EXCEL-COL.
    WHEN 1.  MOVE T_EXCEL-VALUE TO record-MATNR.
    WHEN 2.  MOVE T_EXCEL-VALUE TO record-MBRSH.
    WHEN 3.  MOVE T_EXCEL-VALUE TO RECORD-MTART.
    WHEN 4.  MOVE T_EXCEL-VALUE TO RECORD-MAKTX.
    WHEN 5.  MOVE T_EXCEL-VALUE TO RECORD-MEINS.
    WHEN 6.  MOVE T_EXCEL-VALUE TO RECORD-MATKL.
    WHEN 7.  MOVE T_EXCEL-VALUE TO RECORD-BISMT.
    WHEN 8.  MOVE T_EXCEL-VALUE TO RECORD-UMREN_02.
    WHEN 9.  MOVE T_EXCEL-VALUE TO RECORD-UMREN_03.
    WHEN 10. MOVE T_EXCEL-VALUE TO RECORD-MEINH_02.
    WHEN 11. MOVE T_EXCEL-VALUE TO RECORD-MEINH_03.
    WHEN 12. MOVE T_EXCEL-VALUE TO RECORD-UMREZ_02.
    WHEN 13. MOVE T_EXCEL-VALUE TO RECORD-UMREZ_03.
    WHEN 14. MOVE T_EXCEL-VALUE TO RECORD-WERKS.
    WHEN 15. MOVE T_EXCEL-VALUE TO RECORD-EKGRP.
    WHEN 16. MOVE T_EXCEL-VALUE TO RECORD-LGORT.
    WHEN 17. MOVE T_EXCEL-VALUE TO RECORD-DISMM.
    WHEN 18. MOVE T_EXCEL-VALUE TO RECORD-DISPO.
    WHEN 19. MOVE T_EXCEL-VALUE TO RECORD-DISLS.
    WHEN 20. MOVE T_EXCEL-VALUE TO RECORD-BESKZ.
    WHEN 21. MOVE T_EXCEL-VALUE TO RECORD-DZEIT.
    WHEN 22. MOVE T_EXCEL-VALUE TO RECORD-FHORI.
    WHEN 23. MOVE T_EXCEL-VALUE TO RECORD-PERKZ.
    WHEN 24. MOVE T_EXCEL-VALUE TO RECORD-MTVFP.
    WHEN 25. MOVE T_EXCEL-VALUE TO RECORD-IPRKZ.
    ENDCASE.
      AT END OF ROW.
    APPEND record.
    CLEAR  record.
    ENDAT.
    ENDLOOP.
    ENDFORM.                    " UPLOAD_FILE
    *&      Form  BDC
          text
    -->  p1        text
    <--  p2        text
    FORM BDC .
    loop at record.
    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'
                                   record-matnr.
    perform bdc_field       using 'RMMG1-MBRSH'
                                   record-mbrsh.
    perform bdc_field       using 'RMMG1-MTART'
                                   record-mtart.
    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'
                                  '=ZU01'.
    perform bdc_field       using 'MAKT-MAKTX'
                                  record-maktx.
    perform bdc_field       using 'BDC_CURSOR'
                                  'MARA-BISMT'.
    perform bdc_field       using 'MARA-MEINS'
                                   record-meins.
    perform bdc_field       using 'MARA-MATKL'
                                   record-matkl.
    perform bdc_field       using 'MARA-BISMT'
                                   record-bismt.
    perform bdc_dynpro      using 'SAPLMGMM' '4300'.
    perform bdc_field       using 'BDC_OKCODE'
                                  '=ZU02'.
    perform bdc_field       using 'BDC_CURSOR'
                                  'RMMG1-MATNR'.
    perform bdc_dynpro      using 'SAPLMGMM' '4300'.
    perform bdc_field       using 'BDC_OKCODE'
                                  '=MAIN'.
    perform bdc_field       using 'MAKT-MAKTX'
                                  record-maktx.
    perform bdc_field       using 'BDC_CURSOR'
                                  'SMEINH-UMREZ(03)'.
    perform bdc_field       using 'SMEINH-UMREN(02)'
                                  record-umren_02.
    perform bdc_field       using 'SMEINH-UMREN(03)'
                                   record-umren_03.
    perform bdc_field       using 'SMEINH-MEINH(02)'
                                   record-meinh_02.
    perform bdc_field       using 'SMEINH-MEINH(03)'
                                   record-meinh_03.
    perform bdc_field       using 'SMEINH-UMREZ(02)'
                                   record-umrez_02.
    perform bdc_field       using 'SMEINH-UMREZ(03)'
                                   record-umrez_03.
    *perform bdc_dynpro      using 'SAPLMGMM' '4300'.
    *perform bdc_field       using 'BDC_OKCODE'
                                 '=MAIN'.
    *perform bdc_field       using 'BDC_CURSOR'
                                 'MAKT-MAKTX'.
    *perform bdc_field       using 'MAKT-MAKTX'
                                 record-maktx.
    *perform bdc_dynpro      using 'SAPLMGMM' '4004'.
    *perform bdc_field       using 'BDC_OKCODE'
                                 '=SP02'.
    *perform bdc_field       using 'BDC_CURSOR'
                                 'MAKT-MAKTX'.
    *perform bdc_field       using 'MAKT-MAKTX'
                                 record-maktx.
    *perform bdc_field       using 'MARA-MEINS'
                                 record-meins.
    *perform bdc_field       using 'MARA-MATKL'
                                  record-matkl.
    *perform bdc_field       using 'MARA-BISMT'
                                 record-bismt.
    perform bdc_dynpro      using 'SAPLMGMM' '4004'.
    perform bdc_field       using 'BDC_OKCODE'
                                  '=SP09'.
    perform bdc_field       using 'BDC_CURSOR'
                                  'MAKT-MAKTX'.
    perform bdc_field       using 'MAKT-MAKTX'
                                  record-maktx.
    perform bdc_dynpro      using 'SAPLMGMM' '0081'.
    perform bdc_field       using 'BDC_CURSOR'
                                  'RMMG1-WERKS'.
    perform bdc_field       using 'BDC_OKCODE'
                                  '=ENTR'.
    perform bdc_field       using 'RMMG1-WERKS'
                                  record-werks.
    perform bdc_dynpro      using 'SAPLMGMM' '4000'.
    perform bdc_field       using 'BDC_OKCODE'
                                  '=SP10'.
    perform bdc_field       using 'MAKT-MAKTX'
                                  record-maktx.
    perform bdc_field       using 'BDC_CURSOR'
                                  'MARC-EKGRP'.
    perform bdc_field       using 'MARA-MEINS'
                                  record-meins.
    perform bdc_field       using 'MARC-EKGRP'
                                  record-ekgrp.
    perform bdc_field       using 'MARA-MATKL'
                                  record-matkl.
    perform bdc_dynpro      using 'SAPLMGMM' '4000'.
    perform bdc_field       using 'BDC_OKCODE'
                                  '=SP11'.
    perform bdc_field       using 'BDC_CURSOR'
                                  'MAKT-MAKTX'.
    perform bdc_field       using 'MAKT-MAKTX'
                                  record-maktx.
    perform bdc_dynpro      using 'SAPLMGMM' '4040'.
    perform bdc_field       using 'BDC_OKCODE'
                                  '=SP12'.
    perform bdc_field       using 'MAKT-MAKTX'
                                  record-maktx.
    perform bdc_dynpro      using 'SAPLMGMM' '0081'.
    perform bdc_field       using 'BDC_CURSOR'
                                  'RMMG1-LGORT'.
    perform bdc_field       using 'BDC_OKCODE'
                                  '=ENTR'.
    perform bdc_field       using 'RMMG1-LGORT'
                                  record-lgort.
    perform bdc_dynpro      using 'SAPLMGMM' '4000'.
    perform bdc_field       using 'BDC_OKCODE'
                                  '=SP13'.
    perform bdc_field       using 'MAKT-MAKTX'
                                  record-maktx.
    perform bdc_field       using 'MARA-MEINS'
                                   record-meins.
    perform bdc_field       using 'MARC-EKGRP'
                                  record-ekgrp.
    perform bdc_field       using 'MARC-DISMM'
                                   record-dismm.
    perform bdc_field       using 'MARC-DISPO'
                                  record-dispo.
    perform bdc_field       using 'BDC_CURSOR'
                                  'MARC-DISLS'.
    perform bdc_field       using 'MARC-DISLS'
                                  record-disls.
    perform bdc_dynpro      using 'SAPLMGMM' '4000'.
    perform bdc_field       using 'BDC_OKCODE'
                                  'SP14'.
    perform bdc_field       using 'MAKT-MAKTX'
                                  record-maktx.
    perform bdc_field       using 'MARC-BESKZ'
                                  record-beskz.
    perform bdc_field       using 'BDC_CURSOR'
                                  'MARC-FHORI'.
    perform bdc_field       using 'MARC-FHORI'
                                   record-fhori.
    perform bdc_field       using 'MARC-DZEIT'
                                  record-dzeit.
    perform bdc_dynpro      using 'SAPLMGMM' '4000'.
    perform bdc_field       using 'BDC_OKCODE'
                                  '=SP15'.
    perform bdc_field       using 'MAKT-MAKTX'
                                  record-maktx.
    perform bdc_field       using 'MARC-PERKZ'
                                   record-perkz.
    perform bdc_field       using 'BDC_CURSOR'
                                  'MARC-MTVFP'.
    perform bdc_field       using 'MARC-MTVFP'
                                  record-mtvfp.
    perform bdc_dynpro      using 'SAPLMGMM' '4000'.
    perform bdc_field       using 'BDC_OKCODE'
                                  '=SP19'.
    perform bdc_field       using 'BDC_CURSOR'
                                  'MAKT-MAKTX'.
    perform bdc_field       using 'MAKT-MAKTX'
                                  record-maktx.
    perform bdc_dynpro      using 'SAPLMGMM' '4000'.
    perform bdc_field       using 'BDC_OKCODE'
                                  '=SP20'.
    perform bdc_field       using 'BDC_CURSOR'
                                  'MAKT-MAKTX'.
    perform bdc_field       using 'MAKT-MAKTX'
                                  record-maktx.
    perform bdc_field       using 'MARA-MEINS'
                                  record-meins.
    perform bdc_field       using 'MARA-IPRKZ'
                                   record-iprkz.
    perform bdc_dynpro      using 'SAPLMGMM' '4000'.
    perform bdc_field       using 'BDC_OKCODE'
                                  '=SP23'.
    perform bdc_field       using 'BDC_CURSOR'
                                  'MAKT-MAKTX'.
    perform bdc_field       using 'MAKT-MAKTX'
                                  record-maktx.
    perform bdc_dynpro      using 'SAPLMGMM' '4000'.
    perform bdc_field       using 'BDC_OKCODE'
                                  '=BU'.
    perform bdc_field       using 'BDC_CURSOR'
                                  'MAKT-MAKTX'.
    perform bdc_field       using 'MAKT-MAKTX'
                                   record-maktx.
    perform bdc_field       using 'MARA-MEINS'
                                   record-meins.
    CALL TRANSACTION  'MM01' USING i_bdcdata MODE p_mode.
    CLEAR I_BDCDATA[].
    ENDLOOP.
    ENDFORM.                    " BDC
    FORM bdc_dynpro USING program dynpro.
      CLEAR i_bdcdata.
      i_bdcdata-program  = program.
      i_bdcdata-dynpro   = dynpro.
      i_bdcdata-dynbegin = 'X'.
      APPEND i_bdcdata.
    ENDFORM.
    FORM bdc_field USING fnam fval.
      CLEAR i_bdcdata.
      i_bdcdata-fnam = fnam.
      i_bdcdata-fval = fval.
      APPEND i_bdcdata.
    ENDFORM.
    FORM ERROR_DOWNLOAD .
    DATA: v_errorpath TYPE string.
      v_errorpath = p_erfile.
      CALL FUNCTION 'GUI_DOWNLOAD'
        EXPORTING
       BIN_FILESIZE                  =
          filename                      = v_errorpath
         filetype                      = 'ASC'
       APPEND                        = ' '
       WRITE_FIELD_SEPARATOR         = ' '
       HEADER                        = '00'
       TRUNC_TRAILING_BLANKS         = ' '
       WRITE_LF                      = 'X'
       COL_SELECT                    = ' '
       COL_SELECT_MASK               = ' '
       DAT_MODE                      = ' '
    IMPORTING
       FILELENGTH                    =
        TABLES
          data_tab                      = i_error
    EXCEPTIONS
       FILE_WRITE_ERROR              = 1
       NO_BATCH                      = 2
       GUI_REFUSE_FILETRANSFER       = 3
       INVALID_TYPE                  = 4
       NO_AUTHORITY                  = 5
       UNKNOWN_ERROR                 = 6
       HEADER_NOT_ALLOWED            = 7
       SEPARATOR_NOT_ALLOWED         = 8
       FILESIZE_NOT_ALLOWED          = 9
       HEADER_TOO_LONG               = 10
       DP_ERROR_CREATE               = 11
       DP_ERROR_SEND                 = 12
       DP_ERROR_WRITE                = 13
       UNKNOWN_DP_ERROR              = 14
       ACCESS_DENIED                 = 15
       DP_OUT_OF_MEMORY              = 16
       DISK_FULL                     = 17
       DP_TIMEOUT                    = 18
       FILE_NOT_FOUND                = 19
       DATAPROVIDER_EXCEPTION        = 20
       CONTROL_FLUSH_ERROR           = 21
       OTHERS                        = 22
      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.

    Can't read your code, but what you need would be something like
    CALL TRANSACTION ... USING bdcdata MESSAGES it_messages UPDATE ...
    In messages you will have both succesfully performed steps (field MSGTYP = 'S' ) and the ones which failed (MSGTYP = 'E'),
    so simply loop at that table and create error log based on that messages, then download it.
    Regards
    Marcin

  • Plz tell me BDC  CALL TRANSACTION steps with simple example

    hi,
    plz tell me the steps
    BDC  CALL TRANSACTION steps with simple example

    Hi,
    BATCH DATA COMMUNICATION
    About Data Transfer In R/3 System
    When a company decides to implement the SAP R/3 to manage business-critical data, it usually does not start from a no-data situation. Normally, a SAP R/3 project comes into replace or complement existing application.
    In the process of replacing current applications and transferring application data, two situations might occur:
    ? The first is when application data to be replaced is transferred at once, and only once.
    ? The second situation is to transfer data periodically from external systems to SAP and vice versa.
    ? There is a period of time when information has to be transferred from existing application, to SAP R/3, and often this process will be repetitive.
    The SAP system offers two primary methods for transferring data into SAP systems. From non-SAP systems or legacy system. These two methods are collectively called ?batch input? or ?batch data communication?.
    1. SESSION METHOD
    2. CALL TRANSACTION
    3. DIRECT INPUT
    Advantages offered by BATCH INPUT method:
    1. Can process large data volumes in batch.
    2. Can be planned and submitted in the background.
    3. No manual interaction is required when data is transferred.
    4. Data integrity is maintained as whatever data is transferred to the table is through transaction. Hence batch input data is submitted to all the checks and validations.
    To implement one of the supported data transfers, you must often write the program that exports the data from your non-SAP system. This program, known as a ?data transfer? program must map the data from the external system into the data structure required by the SAP batch input program.
    The batch input program must build all of the input to execute the SAP transaction.
    Two main steps are required:
    ? To build an internal table containing every screen and every field to be filled in during the execution of an SAP transaction.
    ? To pass the table to SAP for processing.
    Prerequisite for Data Transfer Program
    Writing a Data Transfer Program involves following prerequisites:
    Analyzing data from local file
    Analyzing transaction
    Analyzing transaction involves following steps:
    ? The transaction code, if you do not already know it.
    ? Which fields require input i.e., mandatory.
    ? Which fields can you allow to default to standard values.
    ? The names, types, and lengths of the fields that are used by a transaction.
    ? Screen number and Name of module pool program behind a particular transaction.
    To analyze a transaction::
    ? Start the transaction by menu or by entering the transaction code in the command box.
    (You can determine the transaction name by choosing System ? Status.)
    ? Step through the transaction, entering the data will be required for processing your batch input data.
    ? On each screen, note the program name and screen (dynpro) number.
    (dynpro = dyn + pro. Dyn = screen, pro = number)
    ? Display these by choosing System ? Status. The relevant fields are Program (dynpro) and Dynpro number. If pop-up windows occur during execution, you can get the program name and screen number by pressing F1 on any field or button on the screen.
    The technical info pop-up shows not only the field information but also the program and screen.
    ? For each field, check box, and radio button on each screen, press F1 (help) and then choose Technical Info.
    Note the following information:
    - The field name for batch input, which you?ll find in its own box.
    - The length and data type of the field. You can display this information by double clicking on the Data Element field.
    ? Find out the identification code for each function (button or menu) that you must execute to process the batch-input data (or to go to new screen).
    Place the cursor on the button or menu entry while holding down the left mouse button. Then press F1.
    In the pop-up window that follows, choose Technical info and note the code that is shown in the Function field.
    You can also run any function that is assigned to a function key by way of the function key number. To display the list of available function keys, click on the right mouse button. Note the key number that is assigned to the functions you want to run.
    Once you have program name, screen number, field name (screen field name), you can start writing.
    DATA TRANSFER program.
    Declaring internal table
    First Integral Table similar to structure like local file.
    Declaring internal table like BDCDATA
    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 batch input structure.
    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.
    Transferring data from local file to internal table
    Data is uploaded to internal table by UPLOAD of WS_UPLOAD function.
    Population of BDCDATA
    For each record of internal table, you need to populate Internal table, which is similar to BDCDATA structure.
    All these five initial steps are necessary for any type of BDC interface.
    DATA TRANSFER program can call SESSION METHOD or CALL TRANSACTION. The initial steps for both the methods are same.
    First step for both the methods is to upload the data to internal table. From Internal Table, the data is transferred to database table by two ways i.e., Session method and Call transaction.
    SESSION METHOD
    About Session method
    In this method you transfer data from internal table to database table through sessions.
    In this method, an ABAP/4 program reads the external data that is to be entered in the SAP System and stores the data in session. A session stores the actions that are required to enter your data using normal SAP transaction i.e., Data is transferred to session which in turn transfers data to database table.
    Session is intermediate step between internal table and database table. Data along with its action is stored in session i.e., data for screen fields, to which screen it is passed, the program name behind it, and how the next screen is processed.
    When the program has finished generating the session, you can run the session to execute the SAP transactions in it. You can either explicitly start and monitor a session or have the session run in the background processing system.
    Unless session is processed, the data is not transferred to database table.
    BDC_OPEN_GROUP
    You create the session through program by BDC_OPEN_GROUP function.
    Parameters to this function are:
    ? User Name: User name
    ? Group: Name of the session
    ? Lock Date: The date on which you want to process the session.
    ? Keep: This parameter is passed as ?X? when you want to retain session after
    processing it or ? ? to delete it after processing.
    BDC_INSERT
    This function creates the session & data is transferred to Session.
    Parameters to this function are:
    ? Tcode: Transaction Name
    ? Dynprotab: BDC Data
    BDC_CLOSE_GROUP
    This function closes the BDC Group. No Parameters.
    Some additional information for session processing
    When the session is generated using the KEEP option within the BDC_OPEN_GROUP, the system always keeps the sessions in the queue, whether it has been processed successfully or not.
    However, if the session is processed, you have to delete it manually. When session processing is completed successfully while KEEP option was not set, it will be removed automatically from the session queue. Log is not removed for that session.
    If the batch-input session is terminated with errors, then it appears in the list of INCORRECT session and it can be processed again. To correct incorrect session, you can analyze the session. The Analysis function allows to determine which screen and value has produced the error. If you find small errors in data, you can correct them interactively, otherwise you need to modify batch input program, which has generated the session or many times even the data file.
    CALL TRANSACTION
    About CALL TRANSACTION
    A technique similar to SESSION method, while batch input is a two-step procedure, Call Transaction does both steps online, one after the other. In this method, you call a transaction from your program by
    Call transaction <tcode> using <BDCTAB>
    Mode <A/N/E>
    Update <S/A>
    Messages into <MSGTAB>.
    Parameter ? 1 is transaction code.
    Parameter ? 2 is name of BDCTAB table.
    Parameter ? 3 here you are specifying mode in which you execute transaction
    A is all screen mode. All the screen of transaction are displayed.
    N is no screen mode. No screen is displayed when you execute the transaction.
    E is error screen. Only those screens are displayed wherein you have error record.
    Parameter ? 4 here you are specifying update type by which database table is updated.
    S is for Synchronous update in which if you change data of one table then all the related Tables gets updated. And sy-subrc is returned i.e., sy-subrc is returned for once and all.
    A is for Asynchronous update. When you change data of one table, the sy-subrc is returned. And then updating of other affected tables takes place. So if system fails to update other tables, still sy-subrc returned is 0 (i.e., when first table gets updated).
    Parameter ? 5 when you update database table, operation is either successful or unsuccessful or operation is successful with some warning. These messages are stored in internal table, which you specify along with MESSAGE statement. This internal table should be declared like BDCMSGCOLL, a structure available in ABAP/4. It contains the following fields:
    1. Tcode: Transaction code
    2. Dyname: Batch point module name
    3. Dynumb: Batch input Dyn number
    4. Msgtyp: Batch input message type (A/E/W/I/S)
    5. Msgspra: Batch input Lang, id of message
    6. Msgid: Message id
    7. MsgvN: Message variables (N = 1 - 4)
    For each entry, which is updated in database, table message is available in BDCMSGCOLL. As BDCMSGCOLL is structure, you need to declare a internal table which can contain multiple records (unlike structure).
    Steps for CALL TRANSACTION method
    1. Internal table for the data (structure similar to your local file)
    2. BDCTAB like BDCDATA
    3. UPLOAD or WS_UPLOAD function to upload the data from local file to itab. (Considering file is local file)
    4. Loop at itab.
    Populate BDCTAB table.
    Call transaction <tcode> using <BDCTAB>
    Mode <A/N/E>
    Update <S/A>.
    Refresh BDCTAB.
    Endloop.
    (To populate BDCTAB, You need to transfer each and every field)
    The major differences between Session method and Call transaction are as follows:
    SESSION METHOD CALL TRANSACTION
    1. Data is not updated in database table unless Session is processed. Immediate updation in database table.
    2. No sy-subrc is returned. Sy-subrc is returned.
    3. Error log is created for error records. Errors need to be handled explicitly
    4. Updation in database table is always synchronous Updation in database table can be synchronous Or Asynchronous.
    Error Handling in CALL TRANSACTION
    When Session Method updates the records in database table, error records are stored in the log file. In Call transaction there is no such log file available and error record is lost unless handled. Usually you need to give report of all the error records i.e., records which are not inserted or updated in the database table. This can be done by the following method:
    Steps for the error handling in CALL TRANSACTION
    1. Internal table for the data (structure similar to your local file)
    2. BDCTAB like BDCDATA
    3. Internal table BDCMSG like BDCMSGCOLL
    4. Internal table similar to Ist internal table
    (Third and fourth steps are for error handling)
    5. UPLOAD or WS_UPLOAD function to upload the data from the local file to itab. (Considering file is local file)
    6. Loop at itab.
    Populate BDCTAB table.
    Call transaction <tr.code> using <Bdctab>
    Mode <A/N/E>
    Update <S/A>
    Messages <BDCMSG>.
    Perform check.
    Refresh BDCTAB.
    Endloop.
    7 Form check.
    IF sy-subrc <> 0. (Call transaction returns the sy-subrc if updating is not successful).
    Call function Format_message.
    (This function is called to store the message given by system and to display it along with record)
    Append itab2.
    Display the record and message.
    DIRECT INPUT
    Thanks &regards,
    Sravani

  • Changing Service Entry Sheet - Call Transaction / BAPI / etc

    Dear all,
    I need to create a program in order to change data  in service entry sheets services or/and delete services. I wanted to use a BAPI but I can not find one for changing data (only for creating). Trying to use call transaction for transaction ML81N has been nearly impossible due to positioning issues. (It is an Enjoy transaction and acts differently when in batch input mode). The old transaction ML81 also has this positioning problem.
    Has anybody ever done this and has any tips?
    Regards

    Hi,
    The below BAPI's are avilable for transaction ML81N
    BAPI_ENTRYSHEET_CHECK Check Service Entry Sheet
    BAPI_ENTRYSHEET_CREATE Create Entry Sheet
    BAPI_ENTRYSHEET_DELETE Delete Entry Sheet
    BAPI_ENTRYSHEET_GETDETAIL Display Detailed Data on Entry Sheet
    BAPI_ENTRYSHEET_GETLIST List Entry Sheets
    BAPI_ENTRYSHEET_GETRELINFO Detailed Release Information Relating to Entry Sheet
    BAPI_ENTRYSHEET_RELEASE Release Entry Sheet
    BAPI_ENTRYSHEET_RESET_RELEASE Cancel Release of Entry Sheets
    Regards
    Sudheer

  • KO01 call transaction

    Hi,
    I use call transaction for KO01 to create internal orders.  The controlling area will pop up at the first time that the transaction is called.  I've set the controlling area to 1000 so that the screen won't pop up whenever I run the program.  However, I need to catch batch input errors when the input data contains error.  There is an error of "BDC_INSERT, '&' screen is invalid".  However, when I add the controlling area screen back in recording, the error is gone.  But I have SM35 to see a list of input errors, when I process it, sometimes the controlling area screen is pop out, sometimes it doesn't.  It's not consistent.  So the data in the next screen is not populate correctly. 
    Is there a way to make the selection screen consistant, in my program, in actual KO01 transaction?
    Thanks.
    Lily

    I have batch input error session created when there is an error in the input data.  When I set the parameter ID, it gives me an error of "BDC_DATA, '&' screen is invalid".  I've tried to remove the parameter ID, the program can run without error.  However, when I go to SM35 to process the batch session, the screen field after the contralling area is not populated (some data in this screen contains errors).  If the data is not populated in the screen, then the user won't know what's error with the data.
    I think I should ask the question:  where does error "BDC_DATA, '&' screen is invalid" come from?
    Thanks.
    Lily

Maybe you are looking for