BDC in background for Transaction FB50

Hi,
I have created BDC program for FB50 T.code.
when i run this below code (foreground) :
(call transaction FB50 using it_bdcdata mode 'A' update 'S' messages into it_bdcmsgcoll.)
then my it_bdcmsgcoll contain error messages occured during data downloading.
but when i use this below code in (background) :
(call transaction FB50 using it_bdcdata mode 'N update 'S' messages into it_bdcmsgcoll.)
then my it_bdcmsgcoll does'nt contain error messages occured during downloading data.
i also want to capture document no. created when data downloaded in FB50.
when i execute it foreground it show created doc. num. in message place.
please help me it's urgent.
Ps: correct answear will be rewarded by maximum points.
Regards,
Gaurav.

Hi,
After calling the <b>call transaction FB50 using it_bdcdata mode 'N update 'S' messages into it_bdcmsgcoll</b>, You need to Loop through te T100 message, then you will get the Document number, look at the T100 table in the debugging, then you come to know where the Document number is coming
Regards
Sudheer

Similar Messages

  • BDC is not working in background for Transaction COR6N

    Hi ,
       We have written the BDC program for transaction COR6N. BDC works perfectly in foreground but it's not working for background option.
        SELECT SINGLE AUFPL INTO W_AUFPL FROM AFKO
                  WHERE AUFNR = W_AUFNR.
        SELECT AUFPL VORNR INTO TABLE IT_PHASE FROM AFVC
                WHERE AUFPL = W_AUFPL
                  AND PHFLG = 'X'.
        LOOP AT IT_PHASE.
        WA_BDCDATA-PROGRAM  = 'SAPLCORU_S'.
        WA_BDCDATA-DYNPRO   = '0100'.
        WA_BDCDATA-DYNBEGIN = 'X'.
        APPEND WA_BDCDATA TO BDCDATA.
        CLEAR WA_BDCDATA.
        WA_BDCDATA-FNAM     = 'AFRUD-AUFNR'.
        WA_BDCDATA-FVAL     = W_AUFNR.
        APPEND WA_BDCDATA TO BDCDATA.
        CLEAR WA_BDCDATA.
        WA_BDCDATA-FNAM     = 'AFRUD-VORNR'.
        WA_BDCDATA-FVAL     = IT_PHASE-VORNR.
        APPEND WA_BDCDATA TO BDCDATA.
        CLEAR WA_BDCDATA.
        WA_BDCDATA-FNAM     = 'BDC_OKCODE'.
        WA_BDCDATA-FVAL     = '/00'.
        APPEND WA_BDCDATA TO BDCDATA.
        CLEAR WA_BDCDATA.
        WA_BDCDATA-PROGRAM  = 'SAPLCORU_S'.
        WA_BDCDATA-DYNPRO   = '0100'.
        WA_BDCDATA-DYNBEGIN = 'X'.
        APPEND WA_BDCDATA TO BDCDATA.
        CLEAR WA_BDCDATA.
        WA_BDCDATA-FNAM     = 'AFRUD-LMNGA'.
        WA_BDCDATA-FVAL     = w_qty. "'60'.
        APPEND WA_BDCDATA TO BDCDATA.
       CLEAR WA_BDCDATA.
       WA_BDCDATA-FNAM     = 'AFRUD-BUDAT'.
       WA_BDCDATA-FVAL     = w_date. "'31.12.2008'.
       APPEND WA_BDCDATA TO BDCDATA.
        CLEAR WA_BDCDATA.
        WA_BDCDATA-FNAM     = 'BDC_OKCODE'.
        WA_BDCDATA-FVAL     = '=BU'.
        APPEND WA_BDCDATA TO BDCDATA.
        clear X_OPTIONS.
        X_OPTIONS-DISMODE = 'N'.  ' works perfectly for 'A'
        X_OPTIONS-UPDMODE = 'S'.
        X_OPTIONS-CATTMODE = ' '.
        X_OPTIONS-DEFSIZE = ' '.
        X_OPTIONS-RACOMMIT = ' '.
        X_OPTIONS-NOBINPT = 'X'.
        X_OPTIONS-NOBIEND = ' '.
        CALL TRANSACTION 'COR6N'  USING BDCDATA  OPTIONS FROM X_OPTIONS
                           MESSAGES INTO ITAB.
                     MODE 'N'  MESSAGES INTO ITAB UPDATE 'S'.
       WAIT UP TO 3 SECONDS.
        COMMIT WORK AND WAIT.
        CLEAR:BDCDATA[],WA_BDCDATA.

    HI,
    COR6N is the Enjoy Transaction and sap does not suggest to write the BDC on these transaction as most of these transaction uses the GUI elements foe better display and which cannot be recorded while processing the BDC in back ground.
    Check for the Normal transaction and write the BDC for it.
    Or
    Pass X to Rcommit flag in the CTU_PARAMS option and check.

  • BDC or BAPI for Transaction  IFCU

    Is it possible to do a BDC for transaction IFCU.IF not is there a Bapi to put the measurment documents for an equipment

    you can try function module ITOB_CONSUMPTION_UPDATE

  • Fatal error while executing BDC in background for PFCG transaction

    Hello,
    I have requirement where I have to create or modify roles in PFCG transaction.
    I used BDC to do this. While executing in foreground it works fine but in
    background mode it is giving me runtime error as
    "Control Framework: Fatal error - GUI cannot be reached". What
    could be the reason behind it.
    Is there any BAPI available to meet this functionality where I can modify or
    create new roles in PFCG Transaction code.
    Thank You.
    Regards,
    Dipak

    Hi Dengyong,
    I tried searching with that. But did not get any suitable BAPI or FM to meet this functionality.
    Regards,
    Dipak

  • Can BDC recording work for transactions enhanced by GUIXT ?

    Hi,
    We have some transactions enhanced by GUIXT in 4.7 release.
    We want to do BDC on these transactions. The BDC is to run in background.
    Does anyone know if SHBD recordings of these transactions (with GUIXT enabled )
    can be used in the code? Are there any special issues due to these GUIXT modified
    transactions?
    Thanks

    Hi,
    Key point to take care:
    1) When recording run the recording in default screen mode.
    2) If Call transaction Method:
       Use options additio with the Call transaction.
    Ex:
    data: t_opt type CTU_PARAMS.
    Recording..
    t_opt-DEFSIZE = 'X'.
    Call transaction 'XXX' options t_opt.
    3) Session:
    Check the Dynpro standard size checkbox.
    This are the improtant this to take care of.
    thanks.

  • 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

  • BDC or LSMW for open PO

    Dear Friends,
    We are suppose to go likve soon, but we have @ 500 open Purchase orders and we would like to ipload same in sap as retail can any 1 guide me how to do it?
    Regrads,
    Vishal
    [email protected]

    Hi Vishal,
    Please make a note that,
    LSMW is used to transfer Master Data.
    BDC is used for transactional Data.
    LSMW can import data from legacy systems (e.g. in the form of Excel sheets or CSV files). For this, I guess, LSMW converts your data into batch input files automatically. If you use BDC, on the other hand, you have to write your batch input file yourself, line per line.
    So, Open Purchase Order are the Transactional Data for you can use BDC for this Purpose
    Please take your ABAPER's help to will write a Code to Migrate the Data.
    Hope this Solve your Purpose and Please Reward If Really Helpful,
    Thanks and Regards,
    Sateesh.Kandula

  • User Exits for Tcode FB50

    Hi,
    Is there a User exits that upon clicking of save button in Tcode FB50?
    thank you!!!
    james

    Hi,
    Below are the User exits(enhancement name) for transaction FB50
    Exit Name           Description
    F050S001            FIDCMT, FIDCC1, FIDCC2: Edit user-defined IDoc segment
    F050S002            FIDCC1: Change IDoc/do not send
    F050S003            FIDCC2: Change IDoc/do not send
    F050S004            FIDCMT, FIDCC1, FIDCC2: Change outbound IDoc/do not send
    F050S005            FIDCMT, FIDCC1, FIDCC2 Inbound IDoc: Change FI document
    F050S006            FI Outgoing IDoc: Reset Clearing in FI Document
    F050S007            FIDCCH Outbound: Influence on IDoc for Document Change
    F180A001            Balance Sheet Adjustment
    FARC0002            Additional Checks for Archiving MM Vendor Master Data
    FEDI0001            Function Exits for EDI in FI
    RFAVIS01            Customer Exit for Changing Payment Advice Segment Text
    RFEPOS00            Line item display: Checking of selection conditions
    RFKORIEX            Automatic correspondence
    SAPLF051            Workflow for FI (pre-capture, release for payment)
    Best Regards,
    Brijesh

  • Program does BDC for transaction F-52 or f-53

    Hi GuruI am functional person and working with a developer in a program . The program does BDC for transaction F-52 or f-53 . I am uploading a file ,so that the program picks it and o either F-52 or F-53 based on condition. When i try to upload the program with mulitple record ,i am getting the message difference is too large to clear . If i execute the same program without doing any changes again i can see few more records getting posted . when i do next time remaining records are posted . Insted of getting posted in one ,I have to execute the program more than once .can any one help me out why this is happening

    i think you should ask  your programmer to use transaction SM35 to process the BDC in foreground mode (first changing the mode to A). I would think you will see what's going wrong then. There are a few transactions that look different in foreground mode than in background and you will see where the difference is if you use this method to process

  • BackGround Job for Transaction VF06

    Hi Experts,
    We are having problems with the background Job for transaction VF06. We run this job every day except weekends but this job runs and takes only 0 sec without creating Invoices.
    Allthough running this transaction Manually creates Invoice with same variant.
    Kindly help me on this.
    Thanks and Regards,
    Neha Kapoor

    Hi,
    I have the seen the Log it tells:
    Date       Time     Message text                                                                 Message class Message no. Message type
    29.06.2008 22:00:48 Job started                                                                       00           516          S
    29.06.2008 22:00:48 Step 001 started (program RV60SBAT, variant SOIE AUTO BILL, user ID GGBATCH)      00           550          S
    29.06.2008 22:00:48 Job finished                                                                      00           517          S
    But Invoices are not getting created.
    Thanks and Regards,
    Neha Kapoor

  • Problem in creating a BDC program for transaction cj20n(project sytem)

    Hi all,
    I am trying to create project,WBS element ,network and activity using a BDC program,
      I am able to create to a recording for the transaction cj20n using tcode shdb but when i run the recording it doesnt run properly i am not able to create any thing.
    I get error saying that a particular field doesnt exist on the screen.
    Is possible to create a BDC program for transaction CJ20N ?
    Also is there any other alternative  apart from using a BAPI or a function module.
    Thanks,
    Nishant

    Hi,
        Check below link for BAPIs of transaction cj20n.
    [BAPI for cj20n|BAPI for CJ20N transaction]
    Thanks,
    Asit Purbey.

  • BDC for transaction J1IFQ

    Hi Experts,
    I am trying to develop BDC for transaction J1IFQ .
    When I do recording at the end I press SAVE it give me message that record is reconcilie and then I press logout.
    But when I use same recording in my program it dosn't save data. I am not able to find out what is the problem, please guide me.
    Thanking you.

    Hi Narayani
    It seems you need to inspect the new flow of the transaction and your BDC program more carefully. You might have skiped somethings to change.
    *--Serdar <a href="https://www.sdn.sap.com:443http://www.sdn.sap.comhttp://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/com.sap.sdn.businesscard.sdnbusinesscard?u=qbk%2bsag%2bjiw%3d">[ BC ]</a>

  • BDC For Transaction MB1C

    Hi all
    i want bdc program and flat file structure for transaction MB1C to upload stock.
    If anyone have then please send me at [email protected]
    Its urgent.
    Thanks

    Hi
    use the BAPI
    BAPI_GOODSMVT_CREATE
    see the code:
    REPORT ZRICH_0001 .
    Structures for BAPI
    DATA: GM_HEADER  TYPE BAPI2017_GM_HEAD_01.
    DATA: GM_CODE    TYPE BAPI2017_GM_CODE.
    DATA: GM_HEADRET TYPE BAPI2017_GM_HEAD_RET.
    DATA: GM_ITEM    TYPE TABLE OF
                     BAPI2017_GM_ITEM_CREATE WITH HEADER LINE.
    DATA: GM_RETURN  TYPE BAPIRET2 OCCURS 0 WITH HEADER LINE.
    DATA: GM_RETMTD  TYPE BAPI2017_GM_HEAD_RET-MAT_DOC.
    CLEAR: GM_RETURN, GM_RETMTD. REFRESH GM_RETURN.
    Setup BAPI header data.
    GM_HEADER-PSTNG_DATE = SY-DATUM.
    GM_HEADER-DOC_DATE   = SY-DATUM.
    GM_CODE-GM_CODE      = '04'.                                " MB1A
    Write 971 movement to table
    CLEAR GM_ITEM.
    MOVE '412'                 TO GM_ITEM-MOVE_TYPE     .
    MOVE 'Q'                 TO GM_ITEM-SPEC_STOCK.
    MOVE '3800533484'  TO GM_ITEM-MATERIAL.
    MOVE '1'     TO GM_ITEM-ENTRY_QNT.
    *MOVE 'PC'    TO GM_ITEM-ENTRY_UOM.
    MOVE '1060'  TO GM_ITEM-PLANT.
    MOVE '0007'  TO GM_ITEM-STGE_LOC.
    *MOVE '0901'   TO GM_ITEM-MOVE_REAS.
    MOVE 'P203601001' TO GM_ITEM-WBS_ELEM.
    MOVE 'P203601001' TO GM_ITEM-VAL_WBS_ELEM.
    APPEND GM_ITEM.
    Call goods movement BAPI
    CALL FUNCTION 'BAPI_GOODSMVT_CREATE'
         EXPORTING
              GOODSMVT_HEADER  = GM_HEADER
              GOODSMVT_CODE    = GM_CODE
         IMPORTING
              GOODSMVT_HEADRET = GM_HEADRET
              MATERIALDOCUMENT = GM_RETMTD
         TABLES
              GOODSMVT_ITEM    = GM_ITEM
              RETURN           = GM_RETURN.
    IF NOT GM_RETMTD IS INITIAL.
      COMMIT WORK AND WAIT.
      CALL FUNCTION 'DEQUEUE_ALL'.
    ELSE.
      COMMIT WORK AND WAIT.
      CALL FUNCTION 'DEQUEUE_ALL'.
    ENDIF.
    WRITE:/ GM_RETMTD.
    LOOP AT GM_RETURN.
      WRITE:/ GM_RETURN.
    ENDLOOP.
    Reward points if useful
    Regards
    Anji

  • How we can upload the data through BDC for transaction J1ID

    Hi guru
    How w can upload the data for Transaction J1ID.In this we want to upload the data for Customer Excise details. I want to upload the data on behalf of Customer (KUNNR) becasue customer is a primary KEY. Table name: J_1IMOCUST
    Fields. 11 Fields.plz provide some code logic.
    KUNNR     J_1IEXCD     J_1IEXRN     J_1IEXRG     J_1IEXDI     J_1IEXCO     J_1ICSTNO     J_1ILSTNO     J_1IPANNO     J_1IEXCICU     J_1ISERN

    Hi,
    I dont see any difficulties in doing BDC upload for J1ID, You have to record by giving the New Entries button and then enter all the details of customers using table control technique.
    SEARCH SCN for Table Control in BDC
    Regards
    Karthik D

  • 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

  • Baseline Date- Non editable

    Hi all, We want to make the "BASELINE Date " of an open line item as NON EDITABLE. As user makes the changes in Base line date every now and then,when it is open item. I have tried to change the setting in OB32  for BSEG-ZFBDT  by removing the check

  • Save as older version of PDF

    One of our users wants me to save a pdf file in 1.6 (Acrobat 7) format.  They also want the form to print duplex, flip on long edge.  It seems that whatever way I save the form in an older version (i.e. configure distiller, reduce file size or optimi

  • Maintain Config Id for the Start page of e-rec application

    Hi, I've a requirement wherein I need to hide one of the links in the startup pages for the internal candidates. I have made the necessary configuration settings . Also , defined "WDCONFIGURATIONID" parameter for the "hrrcf_a_startpage_int_cand". But

  • Hp officejet 4500 g510n-z prints but won't scan

    hp officejet 4500 g510n-z prints ok but won't scan Windows Vista 32bit one machine Windows 7 4 machines Windows XP 2 machines running on wireless have not tried usb no IP conflicts was working last time I used it (month ago) printer works fine (thoug

  • When I Restore My iPhone...

    Is it going to delete all of my contacts? If so, how do I back all of the up? I put them all in by hand, which means they didn't sync from a program.