Skip to Content

how to create Batch input File

Hi!!

i am using two database tables cobk & coep & two Custom tables repost1 & repost2.

extracting the data from cobk,coep & repost1

&

UPDATING an interanal table of repost2 i.e. itab_repost2.

now passing the data from itab_repost2 to header & item of BAPI.

i.e.

Postings are created using BAPI_ACC_MANUAL_ALLOC_POST.

Now

In case of error a batch input file is created .

Please help me in creating the batch input file.

My Question is how to create this batch input file in case of errors returned by bapi return parameter......

please reply soon....

Amit.

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

7 Answers

  • Best Answer
    Posted on Jan 24, 2008 at 10:30 AM

    STOP, i think there is a misunderstanding, what kind of document are you posting?

    financial document, Manual Reposting of Costs, Manual Reposting of Revenues, Activity Allocation ?

    Regards

    Add a comment
    10|10000 characters needed characters exceeded

  • Posted on Jan 23, 2008 at 01:56 PM

    Hi!!

    please answer the following questions:

    in i_group can i write any group name?

    i_user = sy-user

    i_keep = keep

    in importing i am copying the same

    e_subrc = subrc

    e_msgid = msgid

    e_msgty = msgty

    e_msgno = msgno

    e_msgv1 = msgv1

    e_msgv2 = msgv2

    e_msgv3 = msgv3

    e_msgv4 = msgv4

    in Tables tab i can only provide values to

    ftpost.

    I don't know what to give to fttax & xblntab.

    & one more thing where to check this batch input file.

    Actually i am very new to abap & in my first project i m given this work to do.

    please guide me......

    I will be highly greatful to u

    Thank You.

    amit.

    Add a comment
    10|10000 characters needed characters exceeded

  • Posted on Jan 23, 2008 at 01:00 PM

    Hi!!

    All these three function modules ae needed??

    & have to use one by one??

    & after doing this how to view the file & where it will be generated??

    can u guide me with a detailed procedure.

    Thank You

    amit..

    Add a comment
    10|10000 characters needed characters exceeded

    • The modules POSTING_INTERFACE_START and POSTING_INTERFACE_END will only be called once, and POSTING_INTERFACE_DOCUMENT once per document in error.

      First module can be used like BDC_OPEN

      CALL FUNCTION 'POSTING_INTERFACE_START'

      EXPORTING

      i_function = 'B'

      i_group = <group>

      i_user = <user>

      i_xbdcc = 'X'

      i_keep = <keep>.

      CALL FUNCTION 'POSTING_INTERFACE_END'.

      (No parameters, easy)

      Posting documents

      CALL FUNCTION 'POSTING_INTERFACE_DOCUMENT'

      EXPORTING

      i_tcode = 'FB01'

      IMPORTING

      e_subrc = subrc

      e_msgid = msgid

      e_msgty = msgty

      e_msgno = msgno

      e_msgv1 = msgv1

      e_msgv2 = msgv2

      e_msgv3 = msgv3

      e_msgv4 = msgv4

      TABLES

      t_ftpost = ftpost

      t_fttax = fttax

      t_blntab = xblntab

      FTPOST internal table begins with K-type record (t_ftpost-stype = 'K') for the document header and P-type records for the items with a count to destinct between subsequent items

      Sample :

      K |001 |BKPF-BLDAT |23.01.2008 <

      K |001 |BKPF-BKTXT |A <

      K |001 |BKPF-BUDAT |23.01.2008 <

      K |001 |BKPF-BUKRS |XXX <

      K |001 |BKPF-WAERS |EUR <

      K |001 |BKPF-BLART |SA <

      P |001 |BSEG-SGTXT |FGESP PROPRI <

      P |001 |RF05A-NEWBS |40 <

      P |001 |RF05A-NEWKO |613504 <

      P |001 |BSEG-MWSKZ |P0 <

      P |001 |BSEG-WRBTR |23000 <

      P |001 |BSEG-ZUONR |LFPB <

      P |001 |COBL-PS_PSP_PNR |0 FGESP PR <

      P |002 |BSEG-SGTXT |FGMOH CHARTER <

      P |002 |RF05A-NEWBS |40 <

      P |002 |RF05A-NEWKO |606160 <

      P |002 |BSEG-MWSKZ |P0 <

      P |002 |BSEG-WRBTR |20000 <

      P |002 |BSEG-ZUONR |LFPB <

      P |002 |COBL-PS_PSP_PNR |FGMOH CHARTER <

      Regards

  • author's profile photo Former Member
    Former Member
    Posted on Jan 23, 2008 at 11:02 AM

    Create a recording, generate some sample code and use this code in your own program.

    transaction SM35

    Menu "go to recording"

    push button "create new recording"

    Fill in XK01 and start filling the screens as if you would post data manually.

    Once a recording was created, you can generate an abap program automatically: position on your recording and press the "create program" button...

    Add a comment
    10|10000 characters needed characters exceeded

  • Posted on Jan 23, 2008 at 12:22 PM

    please help..........

    actually the above reply is not able to solve the query.

    thank you

    amit.

    Add a comment
    10|10000 characters needed characters exceeded

  • Posted on Jan 23, 2008 at 12:30 PM

    When the call of the BAPI returns an error, build the BDC for FD01 with function modules like

    POSTING_INTERFACE_START (first)

    POSTING_INTERFACE_DOCUMENT

    POSTING_INTERFACE_END (last)

    or build the batch input file yourself the traditional way (SHDB, etc.)

    As BAPI and BDC are too different interface tools, i don't think there is a program to convert the parameter from one to the old one.

    Regards

    Add a comment
    10|10000 characters needed characters exceeded

  • Posted on Jan 23, 2008 at 01:38 PM

    Thank YOU !!

    please be in tact. I will try the things u have told & if any probs will get back to u..

    thank YOU

    amit

    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.