Bapi or BDC for me12

hi,
Is there any Bapi or BDC for me12.

i think There is no BAPI but you can use ME_DIRECT_INPUT_INFORECORD. otherwise wait for another replies...
Alternatively you can use these FM's
codeME_DB_UPDATE_INFORECORDS Updating info records in database
ME_UPDATE_INFORECORD Update program for purchasing info record
ME_UPDATE_INFORECORD_COND Update price in info record during maintenance from condition transac
ME_UPDATE_INFORECORD_PD Update info records from purchasing documents
Hope this ll be helpful
Thanks & Regards
vinsee

Similar Messages

  • FM or BAPI or BDC for clearing open items...

    Hello Gurus,
    I have to write a code to clear/ close 12 million open G/L items in SAP. Is there a standard SAP FM or BAPI to do this ? Or do I have to write a BDC for this. If I have to write BDC, do I write BDC on T-Code F.13, FB05 or other T-Code.
    Regards,
    Jainam.
    Edited by: Jainam Shah on Sep 23, 2010 5:13 PM

    If you have configured the correct clearing criteria in the IMG, then you can just run program SAPF124.  Why did you need a shell program with a BDC - are you trying to clear by document within your clearing criteria?

  • GTS BAPI or BDC FOR Tcode /SAPSLL/PRODUCT_02

    Hello All,
       I need a help to upload data's in T-code /SAPSLL/PRODUCT_02 (SAP GTS ) Custom Product maintenance, i can't do with BDC because this t-code is having GUI, So kindly guide me how we can upload the data's in this t-code, and there is no BAPI or IDOC for this t-code.
    Thanks in advance.

    hi
    try using this FM /sapsll/product_change
    cheers
    s.janagar

  • BAPI or BDC For TRANSACTION F-28 incoming payment posting (Urjunt)

    Hi Gurus,
    Pls give me some code (BDC Or BAPI) for Transaction F-28.
    Thanks in Advance,
    Mahesh.

    Hi
    Need F-28 Bdc
    BAPI for F-28
    try using  BAPI_ACC_DOCUMENT_POST
    How to use BAPI_ACC_DOCUMENT_POST?
    Regards
    Pavan

  • BAPI or BDC for WTEW

    Dear All,
    I have a requirement wherein I need to automate the creation of Sub Sales Order through WTEW
    tcode in GTM. I'm not able to do it via BDC.
    Is there any BAPI for it ?
    Please help.
    Thanks.

    Could you please be more specific..??
    is it the follow-on documents that you are trying to create after TC creation?
    or sub sales order generation is part of TC creation it self..
    Regards,
    Yadesh

  • BAPI or BDC  for PO Creation

    Hi All,
    I need the sample BDC or BAPI Program for Purchase Order Creations upload.
    Regards
    Mustafa

    Hi Mustafa,
                     The BAPI for PO creation is BAPI_PO_CREATE1.
    Have a look at this thread.Link : [Thread|Reg BAPI_PO_CREATE1;.
    Hope your query resolves quickly.
    Have a best day ahead.

  • BAPI vs BDC for VI02/ VT02N and VL32N

    Hi All,
    I have the following questions to the experts.
    In our 4.6 version we had a custom program with in which using BDC we were doing.
    1) Delete Shipment Cost Documents ( VI02).
    2) Unpack and delete shipment ( Call Transaction to VT02N).
    3) Unpack and delete delivery (VL32N).
    Now in ECC version I want to confirm if these BDCs will work without any issues in future.
    Do we have appropriate BAPI or Function Module for replacing all these BDCs.
    I went through the forum and found many BAPIs like BAPI_SHIPMENT_CHANGE,BAPI_INB_DELIVERY_CHANGE and FMs WS_DELIVERY_CHANGE etc but want to make sure if Unpacking and Deletion both can be handled with the same BAPIs as mentioned?
    For Deleting SCD, have anyone faced any issues with using BDC in ECC or do we need to use some FM like SD_SCD_DELETE etc?
    Please advice.
    Best Regards,
    Ameesha

    Hi Amisha,
    I understand that you aalready have BDC Implementation in place for all these transactions.
    So is it Business requirement to change these to BAPIs. Yes, it is true that the implementaion should   have been done using BAPIs but as you have BDC in place Please perform testing to make sure the BDC code is still working fine.
    If code is fine then you are good otherwise you can either change BDC code to solve the Issues of go for fresh coding using BAPIs to upload/change the data.
    Regards'
    Shital

  • BAPI /BDC for contract data VA41

    hi all,
        We have a requirement. We have Contract data in legacy system, and need to migrate that into SAP (VA41). Should i use BAPI or BDC for this.
    If i have to use BAPI, Please let me know the BAPI name.
    Regards,
    Kavitha

    Hi Kavitha,
                   May be this thread provides you some help.
    Have a look.
    Link:[Thread|Re: Creating Contracts using BAPI_CONTRACT_CREATEFROMDATA;
    Have a best day ahead.

  • EITHER BAPI OR BDC IS BEST FOR F-02

    Hello Friends,
    Iam doing bdc for f-02 even bapi to but iam stuck in middle. i want to upload data for F-02 using posting keys
    40 and 50.
    iam sending sample code for it can any one rectify and tell me whats wrong with this....
    Iam sending both bapi and bdc code...
    Regards
    Bohra.
    REPORT  ZBDC_TEST no standard page heading line-size 255.
    INCLUDE BDCRECX1.
    PARAMETERS: filename LIKE rlgrap-filename.
    TYPES : BEGIN OF IT_TAB,
            bldat(2),                  " DOC DATE
            blart(2),                  " DOC TYPE
            bukrs(4),                  " COMPANY CODE
            budat(8),                  " POSTING DATE
            waers(5),                  " CURRENCY
            xblnr(16),                 " HEADER REF
            bktxt(50),                 " HEADER TXT
          newbs(2),                  " POSTING KEY
            accnt(16),                 " ACCOUNT
            umskz(1),                  " SPL GENREAL LEDGER
            wrbtr(13),                 " AMOUNT IN FOR CURRENCY
            dmbtr(13),                 " AMOUNT FOR COMPANY CODE INR
            zterm(4),                  " PAYEMENT TERM
            zfbdt(8),                  " BASELINE DATE
            wt_wit(2),                 " WITH TAX CODE
            wt_qs(15),                 " WITH TAX BASE
            wt_qb(15),                 " WITH TAX AMOUNT
            mwskz(2),                  " TAX CODE
            bupla(4),                  " BUSINESS PLACE
          bukrs(4),
            kostl(10),                 " COST CENTER
            acgl_it(12),               " INTERNAL ORDER
            acgl_i(10),                " PROFIT CENTER
          acgl_it(8),               " PERSONAL NO
            zuonr(18),                 " ASSIGNMENT
            xblnr1(16),                                         " REF1
            xblnr2(16),                                         " REF2
            xblnr3(16),                                         " REF3
            sgtxt(50),                 " LINE TEXT
          END OF IT_TAB.
    DATA: IT_TAB1 TYPE TABLE OF IT_TAB.
    DATA: WA_HEAD LIKE LINE OF IT_TAB1.
    data: it_bdcdata like bdcdata occurs 0 with header line.
    data: it_bdcmsgcoll like bdcmsgcoll occurs 0 with header line.
    data: i_error like itab occurs 0 with header line.
    data: i_sucess like itab occurs 0 with header line.
    data: v_flag.
    data: v_msg(200).
    DATA :  w_file1 TYPE string.
    AT SELECTION-SCREEN ON VALUE-REQUEST FOR filename.
      CALL FUNCTION 'F4_FILENAME'
        IMPORTING
          file_name = filename.
    START-OF-SELECTION.
      w_file1 = filename.
      CALL FUNCTION 'GUI_UPLOAD'
        EXPORTING
          filename            = w_file1
          filetype            = 'ASC'
          has_field_separator = 'X'
        TABLES
          data_tab            = it_tab1.
    CALL FUNCTION 'BDC_OPEN_GROUP'
    EXPORTING
      CLIENT                    = SY-MANDT
       GROUP                     = 'F-02'
       KEEP                      = 'X'
       USER                      = SY-UNAME.
       CALL FUNCTION 'BDC_INSERT'
        EXPORTING
          TCODE                  = 'F-02'
         TABLES
           DYNPROTAB              = IT_TAB1.
           CALL FUNCTION 'BDC_CLOSE_GROUP'.
    RECORDING PROGRAM FOR F-02
      loop at it_tab1 into wa_head.
        perform bdc_dynpro using 'SAPMF05A' '0100'.
        perform bdc_field using 'BDC_CURSOR'
                                'RF05A-NEWKO'.
        perform bdc_field using 'BDC_OKCODE'
                                '/00'.
        perform bdc_field using 'BKPF-BLDAT'
                                 WA_HEAD-BLDAT.
        perform bdc_field using 'BKPF-BLART'
                                'SA'.
        perform bdc_field using 'BKPF-BUKRS'
                                 WA_HEAD-BUKRS.
        perform bdc_field using 'BKPF-BUDAT'
                                 WA_HEAD-BUDAT.
        perform bdc_field using 'BKPF-MONAT'
                                '3'.
        perform bdc_field using 'BKPF-WAERS'
                                 WA_HEAD-WAERS.
        perform bdc_field using 'BKPF-XBLNR'
                                 WA_HEAD-XBLNR.
        perform bdc_field using 'BKPF-BKTXT'
                                 WA_HEAD-BKTXT.
        perform bdc_field using 'FS006-DOCID'
        perform bdc_field using 'RF05A-NEWBS'
                                 WA_HEAD-NEWBS.
        perform bdc_field using 'RF05A-NEWKO'
                                '100100'.
        perform bdc_dynpro using 'SAPMF05A' '0300'.
        perform bdc_field using 'BDC_CURSOR'
                                'RF05A-NEWKO'.
        perform bdc_field using 'BDC_OKCODE'
                                '/00'.
        perform bdc_field using 'BSEG-WRBTR'
                                 WA_HEAD-WRBTR.
        perform bdc_field using 'BSEG-VALUT'
                                '03/27/2006'.
        perform bdc_field using 'BSEG-ZUONR'
                                 WA_HEAD-ZUONR.
        perform bdc_field using 'BSEG-SGTXT'
                                 WA_HEAD-SGTXT.
        perform bdc_field using 'RF05A-NEWBS'
                                 WA_HEAD-NEWBS.
        perform bdc_field using 'RF05A-NEWKO'
                                '574130'.
        perform bdc_field using 'DKACB-FMORE'
                                'X'.
        perform bdc_dynpro using 'SAPLKACB' '0002'.
        perform bdc_field using 'BDC_CURSOR'
                                'COBL-GSBER'.
        perform bdc_field using 'BDC_OKCODE'
                                '=ENTE'.
        perform bdc_field using 'COBL-GSBER'
                                '101'.
        perform bdc_dynpro using 'SAPMF05A' '0300'.
        perform bdc_field using 'BDC_CURSOR'
                                'BSEG-SGTXT'.
        perform bdc_field using 'BDC_OKCODE'
                                '=BP'.
        perform bdc_field using 'BSEG-WRBTR'
                                 WA_HEAD-WRBTR.
        perform bdc_field using 'BSEG-VALUT'
                                '03/27/2006'.
        perform bdc_field using 'BSEG-ZUONR'
                                 WA_HEAD-ZUONR.
        perform bdc_field using 'BSEG-SGTXT'
                                 WA_HEAD-SGTXT.
        perform bdc_dynpro using 'SAPLKACB' '0002'.
        perform bdc_field using 'BDC_CURSOR'
                                'COBL-KOSTL'.
        perform bdc_field using 'BDC_OKCODE'
                                 '=ENTE'.
        perform bdc_field using 'COBL-GSBER'
                                '101'.
        perform bdc_field using 'COBL-KOSTL'
                                 WA_HEAD-KOSTL.
      ENDLOOP.
    BAPI PROGRAM----
    *& Report  ZBAPI_TEST
    REPORT  ZBAPI_TEST.
    DATA: BEGIN OF i_data OCCURS 0,
            text(255),
          END OF i_data.
    DATA: i_fico TYPE BAPIACHE09.
    *DATA: I_FICO1 TYPE BAPIACCR08.
    DATA: I_FICO1 TYPE BAPIACGL09.
    DATA: I_FICO3 TYPE BAPIACCR09.
    DATA: I_FICO2 TYPE BAPIACTX09.
    DATA: P_KEY TYPE BBSEG.
    *DATA: it_TAB LIKE TABLE OF i_fico INITIAL SIZE 0  WITH HEADER LINE.
    HEADER DETAILS FROM BAPI STRUCUTE BAPIACHE09
    DATA: BEGIN OF it_TAB1 OCCURS 0,   " BAPIACHE09
          bldat(8),                    " DOC DATE
          blart(2),                    " DOC TYPE
          bukrs(4),                    " COMPANY CODE
          BUDAT(8),                    " POSTING DATE
          XBLNR(16),                   " HEADER REF
          BKTXT(50),                   " HEADER TXT
          END OF IT_TAB1.
    DATA: it_TAB LIKE TABLE OF BAPIACHE09 INITIAL SIZE 0 WITH HEADER LINE .
    ITEM DETAILS FROM STRUCTURE OF BAPI G/L ACCOUNT ITEM BAPIACGL09.
    DATA: BEGIN OF IT_ITAB3 OCCURS 0,  " BAPIACGL09.
          HKONT(10),                   " General Ledger Account
          SGTXT(50),                   " ITEM TXT
          BUKRS(4),                    " Company Code
          KOSTL(10),                   " COST CENTER
          PRCTR(10),                   " PROFIT CENTER
          END OF IT_ITAB3.
    DETIALS OF CURRENCY ITEMS FROM STRUCTURE OF BAPI BAPIACCR09
    DATA: BEGIN OF IT_iTAB4 OCCURS 0,   " BAPIACCR09
          WAERS(5),                     " CURRENCY
          BAPIWRBTR(23),                " Amount in document currency
          BAPIFWBAS(23),                " Tax Base Amount in Document Currency
          END OF IT_ITAB4.
    TAX ITEM DETAILS FROM BAPI STRUCUTE BAPIACTX09.
    DATA: BEGIN OF IT_ITAB5 OCCURS 0,   " BAPIACTX09.
          MWSKZ(2),                     " Sales Tax Code
          TXJCD(15),                    " Tax Jurisdiction
          ACPI_TXJCD_DEEP(15),          " Tax jurisdiction code - jurisdiction for lowest level tax
          END OF IT_ITAB5.
    THIS IS FROM STRUCTURE BBSEG.
    DATA: BEGIN OF IT_TAB6 OCCURS 0,
          NEWBS(2),                     " Posting Key for the Next Line Item
          NEWUM(1),                     " Special G/L Indicator for the Next Line Item
          DMBTR(16),                    " Amount in local currency (batch input field)
          AUFNR(12),                    " Order Number
          DZUONR(18),                   " Assignment number
          ZTERM(4),                     " Terms of payment key
          ZFBDT(8),                     " Baseline Date.
          END OF IT_TAB6.
    DATA: v_index TYPE i.
    DATA: return TYPE TABLE OF bapiret2 INITIAL SIZE 0 WITH HEADER LINE.
    START-OF-SELECTION.
      CALL FUNCTION 'UPLOAD'
    EXPORTING
      CODEPAGE                      = ' '
      FILENAME                      = ' '
      FILETYPE                      = ' '
      ITEM                          = ' '
      FILEMASK_MASK                 = ' '
      FILEMASK_TEXT                 = ' '
      FILETYPE_NO_CHANGE            = ' '
      FILEMASK_ALL                  = ' '
      FILETYPE_NO_SHOW              = ' '
      LINE_EXIT                     = ' '
      USER_FORM                     = ' '
      USER_PROG                     = ' '
      SILENT                        = 'S'
    IMPORTING
      FILESIZE                      =
      CANCEL                        =
      ACT_FILENAME                  =
      ACT_FILETYPE                  =
        TABLES
          data_tab                      = i_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 sy-subrc <> 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
            WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
      ENDIF.
    CALL FUNCTION 'BAPI_ACC_GL_POSTING_CHECK'
    EXPORTING
      DOCUMENTHEADER       =
       TABLES
         ACCOUNTGL            = it_tab1
      CURRENCYAMOUNT       =
         RETURN               = return.
      CALL FUNCTION 'BAPI_ACC_DOCUMENT_POST'
        EXPORTING
          DOCUMENTHEADER         =  it_tab
        TABLES
         ACCOUNTGL               = it_Itab3
         ACCOUNTRECEIVABLE       = it_Itab4
      ACCOUNTPAYABLE         =
         ACCOUNTTAX              = it_Itab5
       CURRENCYAMOUNT        =
      CRITERIA               =
      VALUEFIELD             =
      EXTENSION1             =
          RETURN                 =  return.
      loop at return.
        write:/ return-message,return-type.
      endloop.

    Try BAPI_ACC_GL_POSTING_POST.
    CALL FUNCTION 'BAPI_ACC_GL_POSTING_POST'
      EXPORTING
        DOCUMENTHEADER       =
        IMPORTING
              OBJ_TYPE             =
              OBJ_KEY              =
              OBJ_SYS              =
      TABLES 
             ACCOUNTGL            =   
            CURRENCYAMOUNT       =   
           RETURN               =
             EXTENSION1           =

  • BDC for MM01 using bapi

    HI all ,
    i am new to bapi . i have created so many bdcs to upload data in sap but havent done any bapi .
    i want to upload data through bapi  for mm01 .
    how can i achieve this and which bapi is responsible for this job . plz send any sample code for this .
    Thanks ,
    Amit Ranjan .

    Hi Amit,
    Refer to the code in the following link:
    Re: Reg Transfer of MM01 data using BAPI method
    Hope this will solve your query...

  • BAPI or BDC Program For pricing VK11

    Hi All,
       Is there any standard program for pricing VK11 using batch input or send me some coding on Bapi or BDC.
    Thanks in Advance.
    Arun.
    Edited by: Arun Kumaran on Dec 24, 2009 11:40 AM

    Hi,
    You can go for BAPI "BAPI_PRICES_CONDITIONS " instead of a BDC.. you could have search in forums first for these type of questions any ways
    See the link below..
    BDC (VK11)
    regards,
    NZR

  • Is there a BAPI I can use instead of BDC for MMAM.

    I want to change material types for a bunch of records in batch.  CAn I call  a BAPI that would do this instead of BDC for MMAM

    hi,
    try using the following bapis:
    BAPI_MATERIAL_MAINTAINDATA_RT
    BAPI_MATERIAL_EDIT
    i hope it helps.
    regards
    arjun

  • BAPI or BDC Program For Contracts VA41,42

    Hi all,
    send me BDC or BAPI programs for Contracts VA41.
    I fond some sample coding by searching in SDN but they looks like a single paragraph can't split that.
    Thanks & regards,
    Arun.

    Hi,
    Use BAPI BAPI_CONTRACT_CREATEFROMDATA. For coding, you don't have to search. Just read the FM documentation. Thats enough for coding.
    Try to search for where used list of this BAPI. If you are lucky enough, you can get the sample code as well.
    Thanks,
    Vinod.

  • BDC for MIGO for GR OutBound Delivery( A01 & R05 ) from Movement Type 107 to 109

    Hi,
    I am stuck with a very typical situation need all your expertise and advices for a solution.
    We are basically trying to create change the movement type from 107 to 109 through MIGO.
    I have made a BDC recording for MIGO ( because we would like to track each delivery specifically under shipment , I know that there is a BAPI which is there to do this but it works fine if we do the shipment with Purchase Order as input which dont want in that manner )
    Process:
    1. Creating Production Order
    2. Creating Purchase Order
    3. Creating STO
    4. Deliveries
    5. PGI for Deliveries
    6. Shipment for group of outbound Deliveries
    I have created a z program where i am passing shipment number in the selection screen.
    Then it would take all the deliveries for that shipment and pass each delivery to MIGO and process it and change the status from 107 to 109.
    Interesting part here is, the code works absolutely perfect only from my ID. But when I test from other ID it is not executing, so to check where is the problem I have added mess_tab to the CALL TRANSACTION to capture what message is been populated for my ID comparing with others
    Message Captured on Others ID's:
    MSGID: 00
    MSGNR: 344
    MSGV1: SAPLMIGO
    MSGV2: 1300
    Message Captured on MY ID:
    MSGID: MIGO
    MSGNR: 012
    MSGV1: 5000005802
    MSGV2: (empty)
    This is the problem this program is executing only on MY ID, rest all ID's it is not processing.
    We have cross verified with security and basis regarding any authorization issues but nothing came up.
    Please help me what could be the issue ( WHY it is processing successfully for my and WHY NOT for other ID's)
    Below is the main code :
    CALL FUNCTION 'CONVERT_DATE_TO_EXTERNAL'                     " Converting Date format to DD/MM/YYYY
         EXPORTING
           DATE_INTERNAL            = sy-datum
         IMPORTING
           DATE_EXTERNAL            = lv_date_external
         EXCEPTIONS
           DATE_INTERNAL_IS_INVALID = 1
           OTHERS                   = 2.
           IF SY-SUBRC <> 0.                                     "#EC NEEDED
    * Implement suitable error handling here
           ENDIF.
    *   Validating input shipment number with database table VTTP
           SELECT VTTP~TKNUM
                  VTTP~TPNUM
                  VTTP~VBELN
             FROM VTTP INNER JOIN VTTK
             ON VTTP~TKNUM = VTTK~TKNUM
             INTO TABLE IT_VTTP
             WHERE VTTK~TKNUM = P_TKNUM
               AND VTTK~STDIS = 'X'.
           IF sy-subrc = 0.
    *   Validating all deliveries having same Delivery type or not
             SELECT * FROM likp INTO TABLE it_likp FOR ALL ENTRIES IN it_vttp WHERE vbeln = it_vttp-vbeln
                                                                                AND vbtyp = 'J'.
             IF sy-subrc = 0.
               CLEAR lv_lines.
               LOOP AT it_likp INTO wa_likp.
                 REFRESH:it_vbfa,BDCDATA.
    *   Validating if Delivery Type = 109 (GR already done), or Delivery Type = 107 (must process for GR )
                 SELECT * FROM vbfa INTO TABLE it_vbfa WHERE vbelv = wa_likp-vbeln
    *                                                AND vbtyp_v = 'J'
                                                         AND bwart = '109'.
                 IF sy-subrc = 0.
                   lv_flag1 = 'X'.
                 ELSE.
                   SELECT * FROM vbfa INTO TABLE it_vbfa WHERE vbelv = wa_likp-vbeln
    *                                                  AND vbtyp_v = 'J'
                                                           AND bwart = '107'.
                   IF sy-subrc NE 0.
                     MESSAGE 'No Deliveries with Movement Type "107" ' TYPE 'I'.
                   ELSE.
                     lv_flag2 = 'X'.
                     lv_lines = lv_lines + 1.
    **  BDC for MIGO
                     perform bdc_dynpro      using 'SAPLMIGO' '0001'.
                     perform bdc_field       using 'BDC_OKCODE'
                                                   '=OK_GO'.
                     perform bdc_field       using 'GODYNPRO-ACTION'
                                                   'A01'.
                     perform bdc_field       using 'GODYNPRO-REFDOC'
                                                   'R05'.
                     perform bdc_field       using 'GODEFAULT_TV-BWART'
                                                   '109'.
                     perform bdc_field       using 'BDC_CURSOR'
                                                   'GODYNPRO-OUTBOUND_DELIVERY'.
                     perform bdc_field       using 'GODYNPRO-OUTBOUND_DELIVERY'
                                                   wa_likp-vbeln. "'80019574'.
                     perform bdc_field       using 'GOHEAD-BLDAT'
                                                   lv_date_external. "'04/29/2015'.
                     perform bdc_field       using 'GOHEAD-BUDAT'
                                                   lv_date_external. "'04/29/2015'.
                     perform bdc_field       using 'GOHEAD-WEVER'
                                                   '1'.
                     perform bdc_dynpro      using 'SAPLMIGO' '0001'.
                     perform bdc_field       using 'BDC_OKCODE'
                                                   '=OK_POST1'.
                     perform bdc_field       using 'GODEFAULT_TV-BWART'
                                                   '109'.
                     perform bdc_field       using 'GOHEAD-BLDAT'
                                                   lv_date_external. "'04/29/2015'.
                     perform bdc_field       using 'GOHEAD-LFSNR'
                                                   wa_likp-vbeln. "'0080019574'.
                     perform bdc_field       using 'GOHEAD-BUDAT'
                                                   lv_date_external. "'04/29/2015'.
                     perform bdc_field       using 'GOHEAD-WEVER'
                                                   '1'.
                     perform bdc_field       using 'GODYNPRO-DETAIL_ZEILE'
                                                   '   1'.
                     perform bdc_field       using 'GOITEM-ERFME'
                                                   'EA'.
                     perform bdc_field       using 'GOITEM-ERFMG'
                                                   '1'.
                     perform bdc_field       using 'GOITEM-LSMNG'
                                                   '1'.
                     perform bdc_field       using 'GOITEM-LSMEH'
                                                   'EA'.
                     perform bdc_field       using 'GOITEM-MIGO_ELIKZ'
                                                   '1'.
                     perform bdc_field       using 'GOITEM-BWART'
                                                   '109'.
                     perform bdc_field       using 'GOITEM-LGOBE'
                                                   'RX Cross-docking'.
                     perform bdc_field       using 'BDC_CURSOR'
                                                   'GODYNPRO-DETAIL_TAKE'.
                     perform bdc_field       using 'GODYNPRO-DETAIL_TAKE'
                                                   'X'.
                     PERFORM bdc_dynpro      USING 'SAPLMIGO' '1300'.
                     PERFORM bdc_field       USING 'BDC_CURSOR'
                                                   'G_TIP_DONT_SHOW_AGAIN'.
                     PERFORM bdc_field       USING 'BDC_OKCODE'
                                                   '=OK_TIP_GO'.
                     PERFORM bdc_field       USING 'G_TIP_DONT_SHOW_AGAIN'
                                                   'X'.
    *& Avoid unncessary screens to populate while processing background.
                     LV_OPTIONS-DISMODE = 'N'.
                     LV_OPTIONS-UPDMODE = 'S'.
                     LV_OPTIONS-NOBINPT = 'X'.
                     CALL TRANSACTION 'MIGO' USING BDCDATA  OPTIONS FROM LV_OPTIONS MESSAGES INTO IT_MESSTAB1 .
                     WAIT UP TO 1 SECONDS.
                     DELETE IT_MESSTAB1 WHERE MSGTYP NE 'E'.
                     IF IT_MESSTAB1[] IS NOT INITIAL.
                       APPEND LINES OF IT_MESSTAB1 TO IT_MESSTAB.
                     ENDIF.
                   ENDIF.
                 ENDIF.
               ENDLOOP.
             ENDIF.
           ELSE.
             MESSAGE 'Shipment Number does not exists Or not Planned' TYPE 'E'.
           ENDIF.
         ELSE.
           MESSAGE 'Please insert Shipment Number' TYPE 'E'.
         ENDIF.
         IF lv_flag1 = 'X' AND lv_flag2 = 'X'.
           MESSAGE 'This shipment is processed with an inconsistent goods receipt' TYPE 'I'.
         ELSEIF lv_flag1 = 'X'.
           MESSAGE 'Shipment already been processed for these deliveries' TYPE 'I'.
         ELSEIF lv_flag2 = 'X'.
           lv_lines1 = lv_lines.
           CONDENSE lv_lines1 NO-GAPS .
           CONCATENATE lv_lines1 'Goods Receipt are posted for the shipment '
                  INTO lv_message SEPARATED BY space.
           MESSAGE  lv_message TYPE 'I'.
         ENDIF.
    * Display Messages from Message TAB.
         DELETE ADJACENT DUPLICATES FROM IT_MESSTAB.
         DATA:lv_msg TYPE string.
         LOOP AT IT_MESSTAB INTO WA_MESSTAB.
           CALL FUNCTION 'FORMAT_MESSAGE'
             EXPORTING
               ID        = WA_MESSTAB-MSGID
               NO        = WA_MESSTAB-MSGNR
               V1        = WA_MESSTAB-MSGV1
               V2        = WA_MESSTAB-MSGV2
               V3        = WA_MESSTAB-MSGV3
               V4        = WA_MESSTAB-MSGV4
             IMPORTING
               MSG       = lv_msg
             EXCEPTIONS
               NOT_FOUND = 1
               OTHERS    = 2.
           IF sy-subrc <> 0.
    * Implement suitable error handling here
           ENDIF.
           WRITE:/ lv_msg.
         ENDLOOP.
    *        Start new screen                                              *
       FORM BDC_DYNPRO USING PROGRAM DYNPRO.                 "#EC PF_NO_TYPE
         CLEAR BDCDATA.
         BDCDATA-PROGRAM  = PROGRAM.
         BDCDATA-DYNPRO   = DYNPRO.
         BDCDATA-DYNBEGIN = 'X'.
         APPEND BDCDATA.
       ENDFORM.
    *        Insert field                                                  *
       FORM BDC_FIELD USING FNAM FVAL.                       "#EC PF_NO_TYPE
         CLEAR BDCDATA.
         BDCDATA-FNAM = FNAM.
         BDCDATA-FVAL = FVAL.
         APPEND BDCDATA.
       ENDFORM.
    Thanks,
    Srini

    Hi Rob,
    Thanks for quick reply.
    I have checked the NOTE : 304122
    But there in the NOTE it says ( " BAPI, BAPI_GOODSMVT_CANCEL, BAPI_GOODSMVT_CREATE, CNTL_ERROR" )
    These BAPI's work perfectly for (purchase order as input type), but here out type is ( A01 & R05 ) we are giving DELIVERY NUMBER as input to MIGO.
    So for this scenario we cannot use those BAPI's mentioned in the NOTE.
    Also as stated earlier in the message interesting part is
    "The code works absolutely perfect only from my ID. But when I test from other ID it is not executing. Code is working exactly as expected ONLY to my ID. When i try to execute the same code from another's ID it is not working"
    So what do you think might be the issue?

  • BDC for FB50L...URGENT

    Hi,
    I am doing the BDC for FB50L but the code doesn't seem to execute...it is giving errors...
    I am attaching the code...Please review it and help me....its really urgent...
    Your help will be really appreciated...
    REPORT  ZTEST_BDC_PARK_ACC_GL.
    DATA:
    t_document_line_item_main LIKE bapiacgl09 OCCURS 100,
    t_document_line_item_enhn LIKE bapiacextc OCCURS 100,
    t_document_line_item_amnt LIKE bapiaccr09 OCCURS 100,
    t_return LIKE bapiret2 OCCURS 100,
    wa_document_header LIKE  bapiache09,
    wa_document_line_item_main LIKE bapiacgl09,
    wa_document_line_item_enhn LIKE bapiacextc,
    wa_document_line_item_amnt LIKE bapiaccr09,
    wa_return LIKE bapiret2.
    DATA: it_bdcdata TYPE TABLE OF bdcdata,
          it_messages TYPE TABLE OF bdcmsgcoll,
          wa_messages TYPE bdcmsgcoll,
          options TYPE ctu_params.
    DATA:  idx TYPE i,
           ch3(5) TYPE c,
           fname(40) TYPE c.
    DATA: indate TYPE d,
          intdate TYPE D.
    CLEAR wa_document_header.
    wa_document_header-obj_type = space.                        "
    wa_document_header-obj_key = space.
    wa_document_header-obj_sys = space.
    wa_document_header-bus_act = 'RFBU'.
    wa_document_header-username = 'INFAUSRTEST'.
    wa_document_header-header_txt = 'BAPI__POST'.
    wa_document_header-comp_code = '1001'.
    wa_document_header-doc_date = '20070814'.
    wa_document_header-pstng_date = '20070814'.
    CLEAR wa_document_header-trans_date.
    CLEAR wa_document_header-fisc_year.
    CLEAR wa_document_header-fis_period.
    wa_document_header-doc_type = 'SY'.
    wa_document_header-ref_doc_no = 'REQUIRED'.
    wa_document_header-ac_doc_no = space.
    wa_document_header-obj_key_r = space.
    wa_document_header-reason_rev = space.
    wa_document_header-compo_acc = space.
    wa_document_header-ref_doc_no_long = space.
    wa_document_header-acc_principle = 'LGAP'.
    wa_document_header-neg_postng = space.
    wa_document_header-obj_key_inv = space.
    wa_document_header-bill_category = space.
    Fill Line Item #1
    CLEAR: wa_document_line_item_main, wa_document_line_item_enhn, wa_document_line_item_amnt.
    Fill Main Portion Of Accounting Line Item
    wa_document_line_item_main-itemno_acc = '1'.         "Accounting Document Line Item Number
    wa_document_line_item_main-gl_account = '2412001067'."HKONT - Account
    wa_document_line_item_main-item_text = 'Test BAPI'.  "SGTXT - Item Text
    wa_document_line_item_main-doc_type = space.         "BLART - Document Type
    wa_document_line_item_main-comp_code = space.        "BUKRS - Company Code
    wa_document_line_item_main-pstng_date = '20070814'.  "BUDAT - Posting Date
    wa_document_line_item_main-alloc_nmbr = space.       "ZUONR - Allocation Number
    wa_document_line_item_main-costcenter = space.       "KOSTL - Cost Center
    wa_document_line_item_main-profit_ctr = space.       "PRCTR - Profit Center
    wa_document_line_item_main-de_cre_ind = 'D'.        "NEWBS - Posting Key / Debit Credit Indicator
    wa_document_line_item_main-trade_id = space.         "RASSC - Company ID Of Trading Partner
    Fill Amount Portion Of Accounting Line Item
    wa_document_line_item_amnt-itemno_acc = '1'.          "Accounting Document Line Item Number
    wa_document_line_item_amnt-curr_type = '00'.          "Currency Type
    wa_document_line_item_amnt-currency = 'USD'.          "WAERS - Currency Key
    wa_document_line_item_amnt-amt_doccur = '239959'.      "WRBTR - Amount In Document Currency Type
    APPEND: wa_document_line_item_main TO t_document_line_item_main,
            wa_document_line_item_amnt TO t_document_line_item_amnt.
    Fill Next Line Item #2
    CLEAR: wa_document_line_item_main, wa_document_line_item_enhn, wa_document_line_item_amnt.
    Fill Main Portion Of Accounting Line Item
    wa_document_line_item_main-itemno_acc = '2'.         "Accounting Document Line Item Number
    wa_document_line_item_main-gl_account = '2412001067'."HKONT - Account
    wa_document_line_item_main-item_text = 'Test BAPI'.  "SGTXT - Item Text
    wa_document_line_item_main-doc_type = space.         "BLART - Document Type
    wa_document_line_item_main-comp_code = space.        "BUKRS - Company Code
    wa_document_line_item_main-pstng_date = '20070814'.  "BUDAT - Posting Date
    wa_document_line_item_main-alloc_nmbr = space.       "ZUONR - Allocation Number
    wa_document_line_item_main-costcenter = space.       "KOSTL - Cost Center
    wa_document_line_item_main-profit_ctr = space.       "PRCTR - Profit Center
    wa_document_line_item_main-de_cre_ind = 'C'.        "NEWBS - Posting Key / Debit Credit Indicator
    wa_document_line_item_main-trade_id = space.         "RASSC - Company ID Of Trading Partner
    Fill Enhancement Portion Of Accounting Line Item
    Fill Amount Portion Of Accounting Line Item
    wa_document_line_item_amnt-itemno_acc = '2'.          "Accounting Document Line Item Number
    wa_document_line_item_amnt-curr_type = '00'.          "Currency Type
    wa_document_line_item_amnt-currency = 'USD'.          "WAERS - Currency Key
    wa_document_line_item_amnt-amt_doccur = '-239959'.     "WRBTR - Amount In Document Currency Type
    APPEND: wa_document_line_item_main TO t_document_line_item_main,
            wa_document_line_item_amnt TO t_document_line_item_amnt.
    *************************BDC PROGRAM**************************************************************
    PERFORM bdc_dynpro TABLES it_bdcdata USING 'SAPMF05A' wa_document_header-comp_code .
    PERFORM bdc_field TABLES it_bdcdata USING 'BDC_OKCODE'
    '=BP'.
      MOVE  wa_document_header-doc_date TO indate.
      CALL FUNCTION 'CONVERT_DATE_TO_INTERNAL'
      EXPORTING
      date_external = indate
      IMPORTING
      date_internal = intdate.
      PERFORM bdc_field TABLES it_bdcdata USING 'ACGL_HEAD-BLDAT'
      INTDATE.
      perform bdc_field TABLES it_bdcdata USING 'ACGL_HEAD-WAERS'
      wa_document_line_item_amnt-currency.
      MOVE  wa_document_header-pstng_date TO indate.
      CALL FUNCTION 'CONVERT_DATE_TO_INTERNAL'
      EXPORTING
      date_external = indate
      IMPORTING
      date_internal = intdate.
      PERFORM bdc_field TABLES it_bdcdata USING 'ACGL_HEAD-BUDAT'
      INTDATE.
      perform bdc_field TABLES it_bdcdata USING 'ACGL_HEAD-XBLNR'
      wa_document_header-ref_doc_no.
      PERFORM bdc_field TABLES it_bdcdata USING 'ACGL_HEAD-BKTXT'
      wa_document_header-header_txt.
      LOOP AT t_document_line_item_main INTO wa_document_line_item_main.
        idx = idx + 1.
        ch3 = idx.
        CONCATENATE 'ACGL_ITEM-HKONT(' ch3 ')' INTO fname.
        CONDENSE fname.
        PERFORM bdc_field TABLES it_bdcdata USING fname
        wa_document_line_item_main-gl_account.
        CONCATENATE 'ACGL_ITEM-SHKZG(' ch3 ')' INTO fname.
        CONDENSE fname.
        PERFORM bdc_field TABLES it_bdcdata USING fname
        wa_document_line_item_main-de_cre_ind.
        CONCATENATE 'ACGL_ITEM-WRBTR(' ch3 ')' INTO fname.
        CONDENSE fname.
        PERFORM bdc_field TABLES it_bdcdata USING fname
        wa_document_line_item_amnt-amt_doccur.
        CONCATENATE 'ACGL_ITEM-SGTXT(' ch3 ')' INTO fname.
        CONDENSE fname.
        PERFORM bdc_field TABLES it_bdcdata USING fname
        wa_document_line_item_main-item_text .
      ENDLOOP.
      options-dismode = 'A'.
      options-nobinpt = 'X'.
      CALL TRANSACTION 'FB50' USING it_bdcdata MESSAGES INTO
      it_messages OPTIONS FROM options.
    Start new screen
    FORM bdc_dynpro TABLES it_bdcdata STRUCTURE bdcdata USING program
    dynpro
      DATA: wa_bdcdata TYPE bdcdata.
      wa_bdcdata-program = program.
      wa_bdcdata-dynpro = dynpro.
      wa_bdcdata-dynbegin = 'X'.
      APPEND wa_bdcdata TO it_bdcdata.
    ENDFORM. "BDC_DYNPRO
    Insert field
    FORM bdc_field TABLES it_bdcdata STRUCTURE bdcdata USING fnam fval.
      DATA: wa_bdcdata TYPE bdcdata.
      IF fval <> space.
        CLEAR wa_bdcdata.
        wa_bdcdata-fnam = fnam.
        wa_bdcdata-fval = fval.
        APPEND wa_bdcdata TO it_bdcdata.
      ENDIF.
    ENDFORM.                    "BDC_FIELD
    Please suggest....
    Thanks

    data : amount(16).
    This below statement is not passing value wa_document_line_item_amnt-amt_doccur into it_bdcdata-fval. So try to move it to a character field and then use the perform statement.
    PERFORM bdc_field TABLES it_bdcdata USING fname
    wa_document_line_item_amnt-amt_doccur.
    change it to:
    WRITE wa_document_line_item_amnt-amt_doccur TO AMOUNT.
    PERFORM bdc_field TABLES it_bdcdata USING fname AMOUNT.
    -Kriss

Maybe you are looking for

  • Why Can't we Get Broadband in our Home when all our neighbours have it!!!!

    I contacted eircom on Wednesday last, 1 July in order to request broadband be installed in my home. I called at 17.42 and the call lasted 29.16 mins.  I explained to your sales representative, Louise Doolan, that I had no telephone line in the home a

  • Old images show up in the content boxes after renumbering

    I am using Bridge CS5 on a mac. I'm a wedding photographer.  This problem happens often. When a rename files after organizing them in the desired order (two photographers)  but before retouching them..... Old wedding images show up in the viewer or p

  • Migrating from suite 9.2 to 9.3.1

    Hello forum, i'm planning to upgrate a old hyperion suite v9.2 to v9.3.1. I'm not going to update the old server but to create a new one with a brand new installation on it (and then "move" my objects). Hyperion Products: - Interactive Reporting (dat

  • Stopping text in music visualizers

    Does anyone know how to prevent the song and artist text from popping up in the music visualizers each time it changes to a new song? Thanks

  • Where can I find ID templates to create a catalog? (in a hurry :)

    I just got InDesign. I am looking for a catalog template that I can upload and drag/drop my photos into and change the text/pricing. Do such catalog templates exist? Just looking for something photo heavy with room for product explanation/pricing. Wh