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

Creating the document through BAPI

Former Member
0 Likes
621

All of kind morning!

Prompt please.

In FB1 when creating the document, on the first screen (" the Data of heading ") you specify Company Code. On the second screen there is a field " New Company Code " (NEWBK) there the second is underlined Company Code. In a result three documents, the General for two Company Codes and separateness for everyone Company Code are formed.

How it is possible to realize it through BAPI? If yes that as it to make.

PS. Earlier, when there was no such need used BAPI_ACC_DOCUMENT_POST.

PS. I Work in 6.0

Beforehand I thank!

4 REPLIES 4
Read only

Former Member
0 Likes
529

Hi,

The posting key is decided automatically by the BAPI, it depends on the sign you have assigned to the amounts.

In this case I suppose the BAPI'll use the postig key 40/50:

40 if the amount is greater than 0,

50 if the amount is less than 0,

So you can have some problem only if you need to use some keys different from 40/50.

In this case I believe you have to use the BAPI BAPI_ACC_DOCUMENT_POST, here you can choose which posting keys to be used in order to transaction key (KOTSL).

See the table T030B

If I could make a suggestion why dont you use LSMW for the same

The standard object is 0100.

It uses the standard program RFBIBL00 itself. But you should be able to format it easily

Here is a document on how you can use the tool.

http://sapabap.iespana.es/sapabap/manuales/pdf/lsmw.pdf

Or you can Do BDC

Look at the below threads, these threads have the sameple code also

Suggest you to Search in SDN with key - FB01

Will get few more useful related Posts.

Read only

0 Likes
529

Many thanks for a fast reply!

But the program for creating of documents has been realized up to me. Documents were created on one Company Code (BUKRS) through BAPI_ACC_DOCUMENT_POST.

It is necessary for me to change the program that the document was created for two Company Code

Read only

Former Member
0 Likes
529

Whether already nobody faced with my problem?

Read only

Former Member
0 Likes
529

up