Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

Mass Posting using FM 'BAPI_CTRACDOCUMENT_CREATE'

Former Member
0 Likes
1,411

Hi Everyone,

We're currently using a FM/BAPI called 'BAPI_CTRACDOCUMENT_CREATE' for posting invoices per contract account.

Our issue is, we want to execute this BAPI into 'mass processing mode' so that it uses the Number Ranges for Mass Processing.

Under BAPI_CTRACDOCUMENT_CREATE, there's a sub-FM 'FKK_CREATE_DOC'.

Then under 'FKK_CREATE_DOC', there's another sub-FM 'FKK_CREATE_DOC_MASS' in which i've tested thru debugging and it works.

-


Here's a snippet of the first part of 'FKK_CREATE_DOC', where it checks if it was called for 'massive processing' mode (my MEM_XSTAR was EQ SPACE.

IF MEM_XSTAR = 'X'.
    IF    I_UPDATE_TASK EQ MEM_UPDAT
    AND   I_RESOB       EQ MEM_RESOB
    AND   I_RESKY       EQ MEM_RESKY
    AND   I_TEST        EQ SPACE
    AND ( I_FKKKO-FIKEY EQ SPACE AND MEM_FIEXT EQ SPACE OR
          I_FKKKO-FIKEY NE SPACE AND MEM_FIEXT NE SPACE    ).
      CALL FUNCTION 'FKK_CREATE_DOC_MASS'
           EXPORTING
                I_FKKKO   = I_FKKKO
           IMPORTING
                E_OPBEL   = E_OPBEL
           TABLES
                T_FKKOP   = T_FKKOP
                T_FKKOPK  = T_FKKOPK
                T_FKKOPW  = T_FKKOPW
                T_FKKOPL  = T_FKKOPL
                T_FKKOPC  = T_FKKOPC
                T_FKKOPKC = T_FKKOPKC.
      EXIT.
    ELSE.
      MESSAGE E174.
    ENDIF.
  ENDIF.

----


How can I call BAPI_CTRACDOCUMENT_CREATE to post my documents thru 'mass processing' mode?

Thanks and Regards,

Brian

2 REPLIES 2
Read only

Former Member
0 Likes
625

Hi,

Check the thread which give some idea about using the required BAPI.

<irrelevant link removed by moderator>

Regards,

Goutam Kolluru.

Edited by: Thomas Zloch on Mar 5, 2012

Read only

0 Likes
625

Hi,

I am facing the same issue mentioned above. Can you please share the solution how to use BAPI BAPI_CTRACDOCUMENT_CREATE for Mass Transaction.

For me the transaction is FP04M.

regards,

Ankur