BDC for Creating HU

Hi,
Using transaction VL02n, i am creating empty handling unit without linking it to any items.  While recording in a tabstrip i am facing problems that in a screen where 5 lines are displayed the control is not moving to next screen
I tried by capturing next page command also, but though the next page is coming, the item value is getting re-initialized to 0 and not to 8 for a page of 7.
Please advise me,

Hi anandha,
1. try this code (just copy paste)
   after execution,
   check the RETURN parameter in debugging.  
REPORT abc.
DATA : hdr TYPE     bapihuhdrproposal.
DATA : return     LIKE     bapiret2 OCCURS 0 WITH HEADER LINE.
hdr-pack_mat = '000000000000000001'.
hdr-hu_status_init = 'A'.
CALL FUNCTION 'BAPI_HU_CREATE'
  EXPORTING
    headerproposal       = hdr
IMPORTING
  HUHEADER             =
  HUKEY                =
  TABLES
  ITEMSPROPOSAL        =
  ITEMSSERIALNO        =
    return               = return
  HUITEM               =
BREAK-POINT.
2.*----
  If u see the documentation on this FM,
   u will get info on what parameter to pass.
   especially the parameter
  HEADERPROPOSAL
regards,
amit m.

Similar Messages

  • BDC for creating sales order

    Hi, can anyone give me any <a href="http://theblogwhichsaysall.blogspot.com">hint</a>

    Hi,
    You can also create the sales order using standard BAPI:
    BAPI_SALESORDER_CREATEFROMDAT1 Sales order: Create Sales Order
    BAPI_SALESORDER_CREATEFROMDAT2 Sales order: Create Sales Order
    Hope this may be usefull.
    Regards,
    Prashant

  • BDC for Modal dialog screen

    Hello,
      I'm creating a bdc for create customer transaction (FD01). The problem I'm currently having is on maintaining the "other communication" details for the customer. The requirement I have is to maintain only the communication type "URI". But I can't find the correct program and screen number for this modal dialog. anyone have an idea?
    Thanks?
    MP

    Hi, thanks for all the reply. However, everything has been tried. The modal screen dialog I was refering at does not contain any program or screen details when I use F1. This screen does not appear in SHDB when doing the recording. SAPLSLVC_FULLSCREEN/0700 is not the screen I'm refering at.
    When you click on the "Other Communication", there will appear the screen I'm refering at having the list of all other communication type you need to maintain (Fax, Telephone, E-mail, URI). This screen is somehow similar the way serach help functions. I'm basically concern on URI. So what I need to do is place the cursor on URI and click on the check button or double cliking URI is ok. This is the part missing on my bdc, choosing the URI in the modal dialog screen. Upon debugging, it seems that a Function is responsible in displaying the screen.Any idea?
    Message was edited by: Marlon Pita

  • BDC for CO production order (KKF1)

    HI All,
    I have a requirement where i have to create a BDC for creating a CO production order using transaction KKF1.
    But the catch in this requirement is that i should create the CO order not using the default plant valuation type, instead the batch valuation type of the material should be fetched from MCHA table and used.
    The transaction KKF1 do not have a entry field for valuation type, the valuation type of the plant for which the material is defined is taken as default by the system,
    Incase the valuation type of the plant do not match is not maintained for the material, a pop-up comes indicating of an error and an option to change the default valuation type.
    Please suggest me how i can change the default valuation type or how i can tackle this issue in my BDC.
    Thanks in advance, any help is appericiated .
    Edited by: Derek needs help on Jun 28, 2010 10:15 AM

    HI All,
    I have a requirement where i have to create a BDC for creating a CO production order using transaction KKF1.
    But the catch in this requirement is that i should create the CO order not using the default plant valuation type, instead the batch valuation type of the material should be fetched from MCHA table and used.
    The transaction KKF1 do not have a entry field for valuation type, the valuation type of the plant for which the material is defined is taken as default by the system,
    Incase the valuation type of the plant do not match is not maintained for the material, a pop-up comes indicating of an error and an option to change the default valuation type.
    Please suggest me how i can change the default valuation type or how i can tackle this issue in my BDC.
    Thanks in advance, any help is appericiated .
    Edited by: Derek needs help on Jun 28, 2010 10:15 AM

  • BDC for services line

    Hi experts,
    I am doing Maintenance orders cretaion using bdc tcodeIW31.
    i am not able to do shdb for creating line item.
    operation tab button ->external->service->adopt services ( i need to select one line item)
    Please help me

    Hi Ramesh,
    I feel you should use the BAPI BAPI_ALM_ORDER_MAINTAIN, instead of a BDC for creating a maintenance orders. This BAPi takes care of creating multiple line items.
    Hope it helps
    Lokesh

  • BDC for Uploading data from XL sheet with unknown order of fields

    Hi SAP Gurus,
    My requirement is as follows,
    A BDC is to be developed for uploading data from an XL sheet, but the problem here is , the order of fileds in the sheet can be changed .
    ie,  for example the fields in the XL sheet are :-
      matnr    maktx   menge  amount
    but the user can give as
      matnr  amount  menge  maktx
      or
    maktx   matnr  amount  menge
    how i can solve this problem.
    Thanks and Regards,
    pavan.

    Hi Pavan,
    You need to handle it by your self, you can create a dynamic table based on the file value.
    The field name pass from file with the record as a header, and based on the header name create your dynamic table.
    afterward you can pass your value to BDC.
    for creating dynamic table you can use this method
    call method cl_alv_table_create=>create_dynamic_table
      exporting
       i_style_table             =
        it_fieldcatalog           = it_field[]
       i_length_in_byte          =
      importing
        ep_table                  = dyn_tab
       e_style_fname             =
      exceptions
        generate_subpool_dir_full = 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.
    -Dhirendra

  • BDC for ME21 Po create

    Hi ALL,
    Iam Creating BDC Program bu using ME21 for Uploading PO.
    Iam getting error at Income term2 in the Second Screen of ME21. Iam Passing this value through Excel Sheet But event then it is not picking. When i check in debugging the value of income term2 is populating.
    Let me know what are the mandotory fields for creating PO using Me21.
    Here iam also attaching the code, Please help us because it is very urgent.
    report ZPOUPLOADME21
    no standard page heading line-size 255.
    *include bdcrecx1.
    INCLUDE YMM_BDCRECX1.
    •     Internal Table T_BDCDATA to store BDC data
    •     Batchinputdata of single transaction
    DATA: T_BDCDATA LIKE BDCDATA OCCURS 0 WITH HEADER LINE.
    •     Internal Table T_BDC_MSG to store BDC messages
    DATA: T_BDC_MSG LIKE STANDARD TABLE OF BDCMSGCOLL INITIAL
    SIZE 0 WITH HEADER LINE.
    DATA: V_FILE LIKE RLGRAP-FILENAME ,
    V_COUNT(5) TYPE C,
    V_MESSAGE_CNT(5) TYPE C .
    DATA : BEGIN OF IT_DATA OCCURS 0,
    LIFNR LIKE EKKO-LIFNR, " Vendor
    BSART LIKE RM06E-BSART, " Order Type
    BEDAT(10) TYPE C, " Date
    EKORG LIKE EKKO-EKORG, " Purchasing Organization
    EKGRP LIKE EKKO-EKGRP, " Purchasing Group
    WERKS LIKE RM06E-WERKS, " Plant
    INCO2 LIKE EKKO-INCO2, " Inco Terms
    KNTTP LIKE EKPO-KNTTP, " A/C Assignment Category
    EMATN LIKE EKPO-EMATN, " Material Number
    MENGE LIKE EKPO-MENGE, " Purchase Order Quantity
    NETPR LIKE EKPO-NETPR, " Net Price
    MWSKZ LIKE EKPO-MWSKZ, " Tax Code
    NPLNR LIKE MSEG-NPLNR, " Network
    VORNR LIKE PSORDER-VORNR, " Operation
    END OF IT_DATA.
    START-OF-SELECTION.
    PERFORM OPEN_GROUP.
    PERFORM DATA_UPLOAD.
    PERFORM CALL_TRANSACTION.
    PERFORM CLOSE_GROUP.
    PERFORM WRITE_ERROR.
    *& Form DATA_UPLOAD
    •     text
    •     --> p1 text
    •     <-- p2 text
    FORM DATA_UPLOAD.
    *call function ws_upload to retrieve data from a flat file in the
    *presentation server into an internal table
    CALL FUNCTION 'UPLOAD'
    EXPORTING
    FILENAME = V_FILE
    FILETYPE = 'DAT'
    TABLES
    DATA_TAB = IT_DATA
    EXCEPTIONS
    CONVERSION_ERROR = 1
    INVALID_TABLE_WIDTH = 2
    INVALID_TYPE = 3
    NO_BATCH = 4
    UNKNOWN_ERROR = 5
    GUI_REFUSE_FILETRANSFER = 6
    OTHERS = 7.
    •     if ws_upload fails then display appropriate message
    IF SY-SUBRC 0.
    •     MESSAGE E000 WITH 'Data not Uploaded into internal table'.
    ENDIF.
    ENDFORM. " DATA_UPLOAD
    *& Form CALL_TRANSACTION
    •     text
    •     --> p1 text
    •     <-- p2 text
    FORM CALL_TRANSACTION.
    DATA : V_IVDAT(10) TYPE C,
    V_AKTIV(10) TYPE C,
    V_MESSAGE(404) TYPE C.
    REFRESH T_BDCDATA.
    CLEAR T_BDCDATA.
    V_COUNT = 0.
    V_MESSAGE_CNT = 0.
    LOOP AT IT_DATA .
    V_COUNT = V_COUNT + 1.
    *perform open_group.
    perform bdc_dynpro using 'SAPMM06E' '0100'.
    perform bdc_field using 'BDC_CURSOR'
    'RM06E-WERKS'.
    perform bdc_field using 'BDC_OKCODE'
    '/00'.
    perform bdc_field using 'EKKO-LIFNR'
    IT_DATA-LIFNR.
    perform bdc_field using 'RM06E-BSART'
    IT_DATA-BSART.
    *perform bdc_field using 'RM06E-BEDAT'
    •     '24.01.2008'.
    perform bdc_field using 'RM06E-BEDAT'
    IT_DATA-BEDAT.
    perform bdc_field using 'EKKO-EKORG'
    IT_DATA-EKORG.
    perform bdc_field using 'EKKO-EKGRP'
    IT_DATA-EKGRP.
    *perform bdc_field using 'RM06E-LPEIN'
    •     'T'.
    perform bdc_field using 'RM06E-WERKS'
    IT_DATA-WERKS.
    perform bdc_dynpro using 'SAPMM06E' '0101'.
    perform bdc_field using 'BDC_CURSOR'
    'EKKO-INCO2'.
    perform bdc_field using 'BDC_OKCODE'
    '/00'.
    *perform bdc_field using 'EKKO-EKGRP'
    •     IT_DATA-EKGRP1. "'SP3'.
    *perform bdc_field using 'EKKO-PINCR'
    •     IT_DATA-PINCR. "'10'.
    *perform bdc_field using 'EKKO-SPRAS'
    •     IT_DATA-SPRAS. "'EN'.
    *perform bdc_field using 'EKKO-UPINC'
    •     IT_DATA-UPINC. "'1'.
    *perform bdc_field using 'EKKO-ZTERM'
    •     IT_DATA-ZTERM.
    *perform bdc_field using 'EKKO-WAERS'
    •     IT_DATA-WAERS. "'INR'.
    *perform bdc_field using 'EKKO-ZBD1T'
    •     IT_DATA-ZBD1T. "'44'.
    *perform bdc_field using 'EKKO-WKURS'
    •     IT_DATA-WKURS. "' 1.00000'.
    *perform bdc_field using 'EKKO-INCO1'
    •     IT_DATA-INCO1.
    perform bdc_field using 'EKKO-INCO2'
    IT_DATA-INCO2.
    perform bdc_dynpro using 'SAPMM06E' '0120'.
    perform bdc_field using 'BDC_CURSOR'
    'EKPO-NETPR(01)'.
    perform bdc_field using 'BDC_OKCODE'
    '/00'.
    *perform bdc_field using 'EKPO-KNTTP(01)'
    •     'N'.
    perform bdc_field using 'EKPO-KNTTP(01)'
    IT_DATA-KNTTP.
    perform bdc_field using 'EKPO-EMATN(01)'
    IT_DATA-EMATN.
    perform bdc_field using 'EKPO-MENGE(01)'
    IT_DATA-MENGE.
    perform bdc_field using 'EKPO-NETPR(01)'
    IT_DATA-NETPR.
    perform bdc_dynpro using 'SAPMM06E' '0111'.
    perform bdc_field using 'BDC_CURSOR'
    'EKPO-MWSKZ'.
    perform bdc_field using 'BDC_OKCODE'
    '/00'.
    *perform bdc_field using 'EKPO-KNTTP'
    •     'N'.
    *perform bdc_field using 'EKPO-TXZ01'
    •     'Clamps & Connector'.
    *perform bdc_field using 'EKPO-MENGE'
    •     '4'.
    *perform bdc_field using 'EKPO-SPINF'
    •     'A'.
    *perform bdc_field using 'EKPO-NETPR'
    •     '100.00'.
    *perform bdc_field using 'EKPO-PEINH'
    •     '1'.
    *perform bdc_field using 'EKPO-BPRME'
    •     'NO'.
    *perform bdc_field using 'EKPO-BPUMN'
    •     '1'.
    *perform bdc_field using 'EKPO-BPUMZ'
    •     '1'.
    *perform bdc_field using 'EKPO-PRSDR'
    •     'X'.
    *perform bdc_field using 'RM06E-EEIND'
    •     '24.01.2008'.
    *perform bdc_field using 'RM06E-LPEIN'
    •     'D'.
    *perform bdc_field using 'EKPO-WEPOS'
    •     'X'.
    perform bdc_field using 'EKPO-MWSKZ'
    IT_DATA-MWSKZ.
    *perform bdc_field using 'EKPO-REPOS'
    •     'X'.
    perform bdc_dynpro using 'SAPMM06E' '0511'.
    perform bdc_field using 'BDC_CURSOR'
    'EKKN-SAKTO'.
    perform bdc_field using 'BDC_OKCODE'
    '=ENTE'.
    *perform bdc_field using 'EKKN-SAKTO'
    •     '6034025'.
    *perform bdc_field using 'DKACB-FMORE'
    •     'X'.
    perform bdc_dynpro using 'SAPLKACB' '0002'.
    *perform bdc_field using 'BDC_CURSOR'
    •     'COBL-VORNR'.
    perform bdc_field using 'BDC_OKCODE'
    '=ENTE'.
    perform bdc_field using 'COBL-NPLNR'
    IT_DATA-NPLNR.
    perform bdc_field using 'COBL-VORNR'
    IT_DATA-VORNR.
    perform bdc_dynpro using 'SAPMM06E' '0111'.
    perform bdc_dynpro using 'SAPMM06E' '0120'.
    perform bdc_field using 'BDC_CURSOR'
    'RM06E-EBELP'.
    perform bdc_field using 'BDC_OKCODE'
    '=BU'.
    *perform bdc_field using 'RM06E-EBELP'
    •     '10'.
    perform bdc_dynpro using 'SAPLSPO1' '0300'.
    perform bdc_field using 'BDC_OKCODE'
    '=YES'.
    perform bdc_transaction using 'ME21'.
    perform close_group.
    LOOP AT T_MESSTAB WHERE REC_NO IS INITIAL.
    AT FIRST.
    V_MESSAGE_CNT = V_MESSAGE_CNT + 1.
    T_MESSTAB-REC_NO = V_COUNT.
    ENDAT.
    MODIFY T_MESSTAB TRANSPORTING REC_NO.
    ENDLOOP.
    REFRESH T_BDCDATA.
    CLEAR T_BDCDATA.
    ENDLOOP.
    SKIP.
    WRITE : /10 'Record Number ', 30 'Error Message'.
    SKIP.
    endform.
    *& Form WRITE_ERROR
    •     text
    •     --> p1 text
    •     <-- p2 text
    FORM WRITE_ERROR.
    LOOP AT T_MESSTAB.
    WRITE : /10 T_MESSTAB-REC_NO , 30 T_MESSTAB-MESSAGE.
    ENDLOOP.
    ULINE /10(100).
    WRITE : /10 'No of Records : ' , V_COUNT.
    WRITE : /10 'No of Erroneous Records : ' , V_MESSAGE_CNT.
    ULINE /10(100).
    ENDFORM. " WRITE_ERROR
    *& Form CHECK_BDC
    •     text
    •     --> p1 text
    •     <-- p2 text
    FORM CHECK_BDC.
    DATA: L_CHECK LIKE YMMT_CHECK_BDC-YCHECK.
    SELECT SINGLE YCHECK INTO L_CHECK FROM YMMT_CHECK_BDC
    WHERE PROGRAMM EQ SY-REPID
    AND YCHECK EQ 'X'.
    IF SY-SUBRC NE 0.
    MESSAGE S000(YM) WITH 'Execution not possible'.
    STOP.
    ENDIF.
    ENDFORM. " CHECK_BDC
    <REMOVED BY MODERATOR>
    Thanks
    Rahul
    Edited by: Alvaro Tejada Galindo on Jan 24, 2008 9:38 AM

    it depends on your release whether you can use ME21N and/or the bapi.
    but why throw away what you have already achieved? ME21 still works also in later releases. to find out the mandatory fields in your system, check the customzing settings in tx. OLME -> Purchase Order -> Define Screen Layout at Document Level -> click on ME21 -> Terms of delivery and payment. Here are the incoterm-settings.
    Edited by: Mylene Euridice Dorias on Jan 24, 2008 5:19 PM

  • BDC FOR PO CREATE USING ME21

    Iam Creating BDC Program bu using ME21 for Uploading PO.
    Iam getting error at Income term2 in the Second Screen of ME21. Iam Passing this value through Excel Sheet But event then it is not picking. When i check in debugging the value of income term2 is populating.
    Let me know what are the mandotory fields for creating PO using Me21.
    Here iam also attaching the code, Please help us because it is very urgent.
    report ZPOUPLOADME21
    no standard page heading line-size 255.
    *include bdcrecx1.
    INCLUDE YMM_BDCRECX1.
    •     Internal Table T_BDCDATA to store BDC data
    •     Batchinputdata of single transaction
    DATA: T_BDCDATA LIKE BDCDATA OCCURS 0 WITH HEADER LINE.
    •     Internal Table T_BDC_MSG to store BDC messages
    DATA: T_BDC_MSG LIKE STANDARD TABLE OF BDCMSGCOLL INITIAL
    SIZE 0 WITH HEADER LINE.
    DATA: V_FILE LIKE RLGRAP-FILENAME ,
    V_COUNT(5) TYPE C,
    V_MESSAGE_CNT(5) TYPE C .
    DATA : BEGIN OF IT_DATA OCCURS 0,
    LIFNR LIKE EKKO-LIFNR, " Vendor
    BSART LIKE RM06E-BSART, " Order Type
    BEDAT(10) TYPE C, " Date
    EKORG LIKE EKKO-EKORG, " Purchasing Organization
    EKGRP LIKE EKKO-EKGRP, " Purchasing Group
    WERKS LIKE RM06E-WERKS, " Plant
    INCO2 LIKE EKKO-INCO2, " Inco Terms
    KNTTP LIKE EKPO-KNTTP, " A/C Assignment Category
    EMATN LIKE EKPO-EMATN, " Material Number
    MENGE LIKE EKPO-MENGE, " Purchase Order Quantity
    NETPR LIKE EKPO-NETPR, " Net Price
    MWSKZ LIKE EKPO-MWSKZ, " Tax Code
    NPLNR LIKE MSEG-NPLNR, " Network
    VORNR LIKE PSORDER-VORNR, " Operation
    END OF IT_DATA.
    START-OF-SELECTION.
    PERFORM OPEN_GROUP.
    PERFORM DATA_UPLOAD.
    PERFORM CALL_TRANSACTION.
    PERFORM CLOSE_GROUP.
    PERFORM WRITE_ERROR.
    *& Form DATA_UPLOAD
    •     text
    •     --> p1 text
    •     <-- p2 text
    FORM DATA_UPLOAD.
    *call function ws_upload to retrieve data from a flat file in the
    *presentation server into an internal table
    CALL FUNCTION 'UPLOAD'
    EXPORTING
    FILENAME = V_FILE
    FILETYPE = 'DAT'
    TABLES
    DATA_TAB = IT_DATA
    EXCEPTIONS
    CONVERSION_ERROR = 1
    INVALID_TABLE_WIDTH = 2
    INVALID_TYPE = 3
    NO_BATCH = 4
    UNKNOWN_ERROR = 5
    GUI_REFUSE_FILETRANSFER = 6
    OTHERS = 7.
    •     if ws_upload fails then display appropriate message
    IF SY-SUBRC 0.
    •     MESSAGE E000 WITH 'Data not Uploaded into internal table'.
    ENDIF.
    ENDFORM. " DATA_UPLOAD
    *& Form CALL_TRANSACTION
    •     text
    •     --> p1 text
    •     <-- p2 text
    FORM CALL_TRANSACTION.
    DATA : V_IVDAT(10) TYPE C,
    V_AKTIV(10) TYPE C,
    V_MESSAGE(404) TYPE C.
    REFRESH T_BDCDATA.
    CLEAR T_BDCDATA.
    V_COUNT = 0.
    V_MESSAGE_CNT = 0.
    LOOP AT IT_DATA .
    V_COUNT = V_COUNT + 1.
    *perform open_group.
    perform bdc_dynpro using 'SAPMM06E' '0100'.
    perform bdc_field using 'BDC_CURSOR'
    'RM06E-WERKS'.
    perform bdc_field using 'BDC_OKCODE'
    '/00'.
    perform bdc_field using 'EKKO-LIFNR'
    IT_DATA-LIFNR.
    perform bdc_field using 'RM06E-BSART'
    IT_DATA-BSART.
    *perform bdc_field using 'RM06E-BEDAT'
    •     '24.01.2008'.
    perform bdc_field using 'RM06E-BEDAT'
    IT_DATA-BEDAT.
    perform bdc_field using 'EKKO-EKORG'
    IT_DATA-EKORG.
    perform bdc_field using 'EKKO-EKGRP'
    IT_DATA-EKGRP.
    *perform bdc_field using 'RM06E-LPEIN'
    •     'T'.
    perform bdc_field using 'RM06E-WERKS'
    IT_DATA-WERKS.
    perform bdc_dynpro using 'SAPMM06E' '0101'.
    perform bdc_field using 'BDC_CURSOR'
    'EKKO-INCO2'.
    perform bdc_field using 'BDC_OKCODE'
    '/00'.
    *perform bdc_field using 'EKKO-EKGRP'
    •     IT_DATA-EKGRP1. "'SP3'.
    *perform bdc_field using 'EKKO-PINCR'
    •     IT_DATA-PINCR. "'10'.
    *perform bdc_field using 'EKKO-SPRAS'
    •     IT_DATA-SPRAS. "'EN'.
    *perform bdc_field using 'EKKO-UPINC'
    •     IT_DATA-UPINC. "'1'.
    *perform bdc_field using 'EKKO-ZTERM'
    •     IT_DATA-ZTERM.
    *perform bdc_field using 'EKKO-WAERS'
    •     IT_DATA-WAERS. "'INR'.
    *perform bdc_field using 'EKKO-ZBD1T'
    •     IT_DATA-ZBD1T. "'44'.
    *perform bdc_field using 'EKKO-WKURS'
    •     IT_DATA-WKURS. "' 1.00000'.
    *perform bdc_field using 'EKKO-INCO1'
    •     IT_DATA-INCO1.
    perform bdc_field using 'EKKO-INCO2'
    IT_DATA-INCO2.
    perform bdc_dynpro using 'SAPMM06E' '0120'.
    perform bdc_field using 'BDC_CURSOR'
    'EKPO-NETPR(01)'.
    perform bdc_field using 'BDC_OKCODE'
    '/00'.
    *perform bdc_field using 'EKPO-KNTTP(01)'
    •     'N'.
    perform bdc_field using 'EKPO-KNTTP(01)'
    IT_DATA-KNTTP.
    perform bdc_field using 'EKPO-EMATN(01)'
    IT_DATA-EMATN.
    perform bdc_field using 'EKPO-MENGE(01)'
    IT_DATA-MENGE.
    perform bdc_field using 'EKPO-NETPR(01)'
    IT_DATA-NETPR.
    perform bdc_dynpro using 'SAPMM06E' '0111'.
    perform bdc_field using 'BDC_CURSOR'
    'EKPO-MWSKZ'.
    perform bdc_field using 'BDC_OKCODE'
    '/00'.
    *perform bdc_field using 'EKPO-KNTTP'
    •     'N'.
    *perform bdc_field using 'EKPO-TXZ01'
    •     'Clamps & Connector'.
    *perform bdc_field using 'EKPO-MENGE'
    •     '4'.
    *perform bdc_field using 'EKPO-SPINF'
    •     'A'.
    *perform bdc_field using 'EKPO-NETPR'
    •     '100.00'.
    *perform bdc_field using 'EKPO-PEINH'
    •     '1'.
    *perform bdc_field using 'EKPO-BPRME'
    •     'NO'.
    *perform bdc_field using 'EKPO-BPUMN'
    •     '1'.
    *perform bdc_field using 'EKPO-BPUMZ'
    •     '1'.
    *perform bdc_field using 'EKPO-PRSDR'
    •     'X'.
    *perform bdc_field using 'RM06E-EEIND'
    •     '24.01.2008'.
    *perform bdc_field using 'RM06E-LPEIN'
    •     'D'.
    *perform bdc_field using 'EKPO-WEPOS'
    •     'X'.
    perform bdc_field using 'EKPO-MWSKZ'
    IT_DATA-MWSKZ.
    *perform bdc_field using 'EKPO-REPOS'
    •     'X'.
    perform bdc_dynpro using 'SAPMM06E' '0511'.
    perform bdc_field using 'BDC_CURSOR'
    'EKKN-SAKTO'.
    perform bdc_field using 'BDC_OKCODE'
    '=ENTE'.
    *perform bdc_field using 'EKKN-SAKTO'
    •     '6034025'.
    *perform bdc_field using 'DKACB-FMORE'
    •     'X'.
    perform bdc_dynpro using 'SAPLKACB' '0002'.
    *perform bdc_field using 'BDC_CURSOR'
    •     'COBL-VORNR'.
    perform bdc_field using 'BDC_OKCODE'
    '=ENTE'.
    perform bdc_field using 'COBL-NPLNR'
    IT_DATA-NPLNR.
    perform bdc_field using 'COBL-VORNR'
    IT_DATA-VORNR.
    perform bdc_dynpro using 'SAPMM06E' '0111'.
    perform bdc_dynpro using 'SAPMM06E' '0120'.
    perform bdc_field using 'BDC_CURSOR'
    'RM06E-EBELP'.
    perform bdc_field using 'BDC_OKCODE'
    '=BU'.
    *perform bdc_field using 'RM06E-EBELP'
    •     '10'.
    perform bdc_dynpro using 'SAPLSPO1' '0300'.
    perform bdc_field using 'BDC_OKCODE'
    '=YES'.
    perform bdc_transaction using 'ME21'.
    perform close_group.
    LOOP AT T_MESSTAB WHERE REC_NO IS INITIAL.
    AT FIRST.
    V_MESSAGE_CNT = V_MESSAGE_CNT + 1.
    T_MESSTAB-REC_NO = V_COUNT.
    ENDAT.
    MODIFY T_MESSTAB TRANSPORTING REC_NO.
    ENDLOOP.
    REFRESH T_BDCDATA.
    CLEAR T_BDCDATA.
    ENDLOOP.
    SKIP.
    WRITE : /10 'Record Number ', 30 'Error Message'.
    SKIP.
    endform.
    *& Form WRITE_ERROR
    •     text
    •     --> p1 text
    •     <-- p2 text
    FORM WRITE_ERROR.
    LOOP AT T_MESSTAB.
    WRITE : /10 T_MESSTAB-REC_NO , 30 T_MESSTAB-MESSAGE.
    ENDLOOP.
    ULINE /10(100).
    WRITE : /10 'No of Records : ' , V_COUNT.
    WRITE : /10 'No of Erroneous Records : ' , V_MESSAGE_CNT.
    ULINE /10(100).
    ENDFORM. " WRITE_ERROR
    *& Form CHECK_BDC
    •     text
    •     --> p1 text
    •     <-- p2 text
    FORM CHECK_BDC.
    DATA: L_CHECK LIKE YMMT_CHECK_BDC-YCHECK.
    SELECT SINGLE YCHECK INTO L_CHECK FROM YMMT_CHECK_BDC
    WHERE PROGRAMM EQ SY-REPID
    AND YCHECK EQ 'X'.
    IF SY-SUBRC NE 0.
    MESSAGE S000(YM) WITH 'Execution not possible'.
    STOP.
    ENDIF.
    ENDFORM. " CHECK_BDC
    Your Help will be highly appreciated.
    If any bapi code you have please send me.
    Thanks
    Rahul

    Hi.
    ckeck this.
    *Code used to create BDC
    *& Report ZBDC_EXAMPLE *
    *& Example BDC program, which updates net price of item 00010 of a *
    *& particular Purchase order(EBELN). *
    REPORT ZBDC_EXAMPLE NO STANDARD PAGE HEADING
    LINE-SIZE 132.
    Data declaration
    TABLES: ekko, ekpo.
    TYPES: BEGIN OF t_ekko,
    ebeln TYPE ekko-ebeln,
    waers TYPE ekko-waers,
    netpr TYPE ekpo-netpr,
    err_msg(73) TYPE c,
    END OF t_ekko.
    DATA: it_ekko TYPE STANDARD TABLE OF t_ekko INITIAL SIZE 0,
    wa_ekko TYPE t_ekko,
    it_error TYPE STANDARD TABLE OF t_ekko INITIAL SIZE 0,
    wa_error TYPE t_ekko,
    it_success TYPE STANDARD TABLE OF t_ekko INITIAL SIZE 0,
    wa_success TYPE t_ekko.
    DATA: w_textout LIKE t100-text.
    DATA: gd_update TYPE i,
    gd_lines TYPE i.
    *Used to store BDC data
    DATA: BEGIN OF bdc_tab OCCURS 0.
    INCLUDE STRUCTURE bdcdata.
    DATA: END OF bdc_tab.
    *Used to stores error information from CALL TRANSACTION Function Module
    DATA: BEGIN OF messtab OCCURS 0.
    INCLUDE STRUCTURE bdcmsgcoll.
    DATA: END OF messtab.
    *Screen declaration
    SELECTION-SCREEN BEGIN OF BLOCK block1 WITH FRAME
    TITLE text-001. "Purchase order Num
    SELECT-OPTIONS: so_ebeln FOR ekko-ebeln OBLIGATORY.
    SELECTION-SCREEN END OF BLOCK block1.
    SELECTION-SCREEN BEGIN OF BLOCK block2 WITH FRAME
    TITLE text-002. "New NETPR value
    PARAMETERS: p_newpr(14) TYPE c obligatory. "LIKE ekpo-netpr.
    SELECTION-SCREEN END OF BLOCK block2.
    *START-OF-SELECTION
    START-OF-SELECTION.
    Retrieve data from Purchase order table(EKKO)
    SELECT ekkoebeln ekkowaers ekpo~netpr
    INTO TABLE it_ekko
    FROM ekko AS ekko INNER JOIN ekpo AS ekpo
    ON ekpoebeln EQ ekkoebeln
    WHERE ekko~ebeln IN so_ebeln AND
    ekpo~ebelp EQ '10'.
    *END-OF-SELECTION
    END-OF-SELECTION.
    Check data has been retrieved ready for processing
    DESCRIBE TABLE it_ekko LINES gd_lines.
    IF gd_lines LE 0.
    Display message if no data has been retrieved
    MESSAGE i003(zp) WITH 'No Records Found'(001).
    LEAVE TO SCREEN 0.
    ELSE.
    Update Customer master data (instalment text)
    LOOP AT it_ekko INTO wa_ekko.
    PERFORM bdc_update.
    ENDLOOP.
    Display message confirming number of records updated
    IF gd_update GT 1.
    MESSAGE i003(zp) WITH gd_update 'Records updated'(002).
    ELSE.
    MESSAGE i003(zp) WITH gd_update 'Record updated'(003).
    ENDIF.
    Display Success Report
    Check Success table
    DESCRIBE TABLE it_success LINES gd_lines.
    IF gd_lines GT 0.
    Display result report column headings
    PERFORM display_column_headings.
    Display result report
    PERFORM display_report.
    ENDIF.
    Display Error Report
    Check errors table
    DESCRIBE TABLE it_error LINES gd_lines.
    If errors exist then display errors report
    IF gd_lines GT 0.
    Display errors report
    PERFORM display_error_headings.
    PERFORM display_error_report.
    ENDIF.
    ENDIF.
    *& Form DISPLAY_COLUMN_HEADINGS
    Display column headings
    FORM display_column_headings.
    WRITE:2 ' Success Report '(014) COLOR COL_POSITIVE.
    SKIP.
    WRITE:2 'The following records updated successfully:'(013).
    WRITE:/ sy-uline(42).
    FORMAT COLOR COL_HEADING.
    WRITE:/ sy-vline,
    (10) 'Purchase Order'(004), sy-vline,
    (11) 'Old Netpr'(005), sy-vline,
    (11) 'New Netpr'(006), sy-vline.
    WRITE:/ sy-uline(42).
    ENDFORM. " DISPLAY_COLUMN_HEADINGS
    *& Form BDC_UPDATE
    Populate BDC table and call transaction ME22
    FORM bdc_update.
    PERFORM dynpro USING:
    'X' 'SAPMM06E' '0105',
    ' ' 'BDC_CURSOR' 'RM06E-BSTNR',
    ' ' 'RM06E-BSTNR' wa_ekko-ebeln,
    ' ' 'BDC_OKCODE' '/00', "OK code
    'X' 'SAPMM06E' '0120',
    ' ' 'BDC_CURSOR' 'EKPO-NETPR(01)',
    ' ' 'EKPO-NETPR(01)' p_newpr,
    ' ' 'BDC_OKCODE' '=BU'. "OK code
    Call transaction to update customer instalment text
    CALL TRANSACTION 'ME22' USING bdc_tab MODE 'N' UPDATE 'S'
    MESSAGES INTO messtab.
    Check if update was succesful
    IF sy-subrc EQ 0.
    ADD 1 TO gd_update.
    APPEND wa_ekko TO it_success.
    ELSE.
    Retrieve error messages displayed during BDC update
    LOOP AT messtab WHERE msgtyp = 'E'.
    Builds actual message based on info returned from Call transaction
    CALL FUNCTION 'MESSAGE_TEXT_BUILD'
    EXPORTING
    msgid = messtab-msgid
    msgnr = messtab-msgnr
    msgv1 = messtab-msgv1
    msgv2 = messtab-msgv2
    msgv3 = messtab-msgv3
    msgv4 = messtab-msgv4
    IMPORTING
    message_text_output = w_textout.
    ENDLOOP.
    Build error table ready for output
    wa_error = wa_ekko.
    wa_error-err_msg = w_textout.
    APPEND wa_error TO it_error.
    CLEAR: wa_error.
    ENDIF.
    Clear bdc date table
    CLEAR: bdc_tab.
    REFRESH: bdc_tab.
    ENDFORM. " BDC_UPDATE
    FORM DYNPRO *
    stores values to bdc table *
    --> DYNBEGIN *
    --> NAME *
    --> VALUE *
    FORM dynpro USING dynbegin name value.
    IF dynbegin = 'X'.
    CLEAR bdc_tab.
    MOVE: name TO bdc_tab-program,
    value TO bdc_tab-dynpro,
    'X' TO bdc_tab-dynbegin.
    APPEND bdc_tab.
    ELSE.
    CLEAR bdc_tab.
    MOVE: name TO bdc_tab-fnam,
    value TO bdc_tab-fval.
    APPEND bdc_tab.
    ENDIF.
    ENDFORM. " DYNPRO
    *& Form DISPLAY_REPORT
    Display Report
    FORM display_report.
    FORMAT COLOR COL_NORMAL.
    Loop at data table
    LOOP AT it_success INTO wa_success.
    WRITE:/ sy-vline,
    (10) wa_success-ebeln, sy-vline,
    (11) wa_success-netpr CURRENCY wa_success-waers, sy-vline,
    (11) p_newpr, sy-vline.
    CLEAR: wa_success.
    ENDLOOP.
    WRITE:/ sy-uline(42).
    REFRESH: it_success.
    FORMAT COLOR COL_BACKGROUND.
    ENDFORM. " DISPLAY_REPORT
    *& Form DISPLAY_ERROR_REPORT
    Display error report data
    FORM display_error_report.
    LOOP AT it_error INTO wa_error.
    WRITE:/ sy-vline,
    (10) wa_error-ebeln, sy-vline,
    (11) wa_error-netpr CURRENCY wa_error-waers, sy-vline,
    (73) wa_error-err_msg, sy-vline.
    ENDLOOP.
    WRITE:/ sy-uline(104).
    REFRESH: it_error.
    ENDFORM. " DISPLAY_ERROR_REPORT
    *& Form DISPLAY_ERROR_HEADINGS
    Display error report headings
    FORM display_error_headings.
    SKIP.
    WRITE:2 ' Error Report '(007) COLOR COL_NEGATIVE.
    SKIP.
    WRITE:2 'The following records failed during update:'(008).
    WRITE:/ sy-uline(104).
    FORMAT COLOR COL_HEADING.
    WRITE:/ sy-vline,
    (10) 'Purchase Order'(009), sy-vline,
    (11) 'Netpr'(010), sy-vline,
    (73) 'Error Message'(012), sy-vline.
    WRITE:/ sy-uline(104).
    FORMAT COLOR COL_NORMAL.
    ENDFORM. " DISPLAY_ERROR_HEADINGS
    regards.
    sowjanya.b.

  • Can we create a single bdc for raw materials , and for some other transacti

    hi
    can we create a single bdc for raw materials , and for some other transaction? how?

    Hi Jyothsna
    For one transaction you will have to build your bdc table according to the recording for that transaction and then call that transaction using the bdc table. For another transaction , you will again have to build the bdc table with the details of that transaction.
    You cannot call all at one shot.
    Cheers
    shivika

  • Error when creating a bdc for asset master upload

    I am getting a warning message (AA186), when changing the depreciation start date to capitalization date. It says,
    "Different Order Dep. start date in depreciation area 01. Check"
    This error is a problem in creating the BDC for asset master upload. We have only one depreciaton area 01 (book dep).
    Please help.

    This is normal message you get when you try to change depn start date. I think this should not be a problem for BDC posting. This message can always be bypassed.

  • BDC not creating documents for J1is

    Dear All,
    I have written BDC for tcode - J1is but it is not creating official excise documents when i upload the data with BDC. But when we do manually it is creating official excise documents perfectly.
    Internal documents are generated both the cases.
    BDC is perfectly running and processes the data.
    Please suggest.
    Thanks,
    Pavan

    VA01 is order creation, Creating an order does not automatically create a delivery, a delivery is created with VL01N in reference to an order.
    Further you should get an error log if you process a BDC, what does it tell you?

  • BDC not creating automatic delivery for consignment fill up in VA01

    Hi,
    I am doing BDC for consignment fill up in VA01. When munually run VA01, it automatically creating delivery. But when run BDC ( call transaction ) it's not creating automatic delivery. why ? I am giving below fields..
    Sales org.
    distribution channel
    division
    customer
    item (material)
    quantity
    batch
    pricing condition
    price
    serial number
    please help me...
    Venkey

    VA01 is order creation, Creating an order does not automatically create a delivery, a delivery is created with VL01N in reference to an order.
    Further you should get an error log if you process a BDC, what does it tell you?

  • BDC for PA30 action hire is not creating entry in IT 1001

    Hello All,
       I created a BDC for to create hire action in system to create some dummy data, but its not creating entry in infotype 1001 for relation between person (P) and position (S). If i create entry in PA30 it create ebtry, if i try BDC in Dialog mode even then its not creating it.
      I read a lot about Dynamic action in this kind of issue but i seen table T588Z but there is no any insert dynamic action for IT 1001.
    Can anybody throw some light on the cause of the same.
    i tried to create same data with FM HR_MIANTAIN_MASTERDATA but i have to drop that idea becasue it was not able to crate record with empty PERNR field. if your answer is use this FM then please provide some working code as i searched a lot on the same issue but no any concrete proof on the same.
    appreciate any reply.
    Mani

    Hi,
    Are you getting any error?
    If not i think you have to lock the employee before creating an entry to the IT 1001 using FM
    'BAPI_EMPLOYEE_ENQUEUE'
    and create an entry to IT 1001 using BDC or HR_MIANTAIN_MASTERDATA
    and unlock an employee by using FM
    'BAPI_EMPLOYEE_DEQUEUE'
    Regards
    Krishna

  • BAPI_GOODSMVT_CREATE or BDC for MB1A not creating Accounting Doc

    It is a strange scenario.  We can manually process a Goods Issue (without reference to a PO# - WBS Element used instead) via MB1A and have an Accounting Doc generated without a problem - movememt 415Q.  But for some reason, we can only create the Material Doc for Goods Issue when using BAPI_GOODSMVT_CREATE or BDC for MB1A (foreground or background).
    Does anyone have any idea why in the world this would be happening?  Especially if we're using the exact same data used to manually create the Goods Issue via MB1A?

    Thanks for the response.  Yes, I did try BAPI_TRANSACTION_COMMIT in all of my tests.  The Accounting Document simply will not get generated.
    Again, what makes it strange is that we created a BDC for MB1A - based on data that worked & that produced an Accounting document.  However, when processing that BDC, either in the foreground or background - the Accounting document likewise does not get created.

  • Creating bdc for transaction f-02 ?

    Hi People,
    I am going a bdc for transaction f-02 ..... my template involves 7 posting keys ( 40 50 31 01 29 09 70 ) ... depending up
    on the posting key the next screen will change .......... can you people tel me how to do this and what are all the logic
    involved in this program ?
    thanks u all in advance.
    Siva

    Hi,
    Please use the following format for your upload file template
    DocDate1    ComCd1    Currency1    pstky1
    DocDate1    ComCd1    Currency1    pstky2
    DocDate1    ComCd1    Currency1    pstky3
    DocDate2    ComCd2    Currency2    pstky1
    DocDate2    ComCd2    Currency2    pstky2
    Then use the following logic.
    At New Currency1
    add the header data
    DocDate1    ComCd1    Currency1
    Thus this code will run only once for every new Header
    and remain in the screen till posting key are entered.
    Regards,
    Lokesh
    Edited by: Lokesh Tibbani on Sep 5, 2008 12:17 PM

Maybe you are looking for

  • Error during executing soap request

    Hello everybody, I am doing this example - http://tylermuth.wordpress.com/2008/03/31/call-bi-publisher-web-services-from-apex/ and getting error: <faultstring>org.xml.sax.SAXException: Invalid element in oracle.xdo.webservice.ScheduleRequest - delive

  • Facebook app from Nokia store won't detect data

    My Facebook app on my E5-00 will only detect the wifi at my house and nothing else. So, when I'm away from home I cannot access this app... The settings on the app doesn't provide a choice of what data I want to use, so what can I do?  I've already d

  • LabVIEW, LabJack, activex problem

    Hello,       I have a problem running a LabJack vi with LabVIEW 7.1 but only in one of the user accounts on my computer.  I have a computer that has two user accounts. There is no problem with account "A", but when I log into account "B" and load the

  • ZdM Agent requiring admin rights to install

    Hi, We are striving to upgrade our Desktop Agent to 6.5.20.0 from what is currently a mixed bag of 4.0.1 upwards. Our desktop environment is XP Sp2. ALL users only have User permissions to the local environment. This is a constant that cannot change.

  • Investment declrations for india

    hi experts, We want to integrate the investment declarations( i.e IT 585,586,581,582..etc) for INDIA. But from EHP5 onwards we dont have any iviews in the part of standard ESS business package. For this , can we create customise webdynpro ABAP applic