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

Spool is not creating while running the BAPI BAPI_GOODSMVT_CREATE

Former Member
0 Likes
1,830

Hi experts,

When a user posts a GR/IR transaction (via MIGO) in SAP ECC, the configuration currently defaults the print out. And when the posting is done, the print output gets generated automatically.

but when I posts the document using the bapi 'BAPI_GOODSMVT_CREATE', it does not create any spool.

please help me... if I need to pass any parameter to this bapi to create spool.....

Ramki

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
1,425

Hi,

maybe it's a booking issue.

I think you have to call fm BAPI_TRANSACTION_COMMIT after your BAPI to start booking.

Regards,

Klaus

9 REPLIES 9
Read only

Former Member
0 Likes
1,425

Hi Ramki

See question 12 in SAP Note 520813: https://service.sap.com/sap/support/notes/520813

In summary, you need to ensure that GOODSMVT_HEADER-PR_UNAME contains a valid user id and that the parameter id 'NDR' is set to 'X' for that user.

Regards

Glen

Read only

0 Likes
1,425

Hi Glen,

Thanx for your reply.....

I Have set the parameter id of USER is 'X', and I checked the settings as well... but still I am not getting the output.

I analysed the issue and finally I came to know that XNAST internal table don't have values. So in standard program it is trying to read the values from XNAST only.... but it don't have values...

and I could not find where exactly the XNAST has getting values.........

please look into this please help me...

Regards,

Ramki

Read only

Former Member
0 Likes
1,426

Hi,

maybe it's a booking issue.

I think you have to call fm BAPI_TRANSACTION_COMMIT after your BAPI to start booking.

Regards,

Klaus

Read only

0 Likes
1,425

Hi Klaus,

I have used the commit bapi after booking............. posting is done succuess fully but output is not generated

Read only

0 Likes
1,425

Hi,

please look at this thread: http://scn.sap.com/thread/2024733

There Raymond Giuseppi  says, that the BAPI doesn't create any spool, you have to do it yourself writing the results of table RETURN ...

Please look at this thread first: http://scn.sap.com/thread/924173

Regards,

Klaus

Other threads:

http://scn.sap.com/thread/1555489

Read only

0 Likes
1,425

For reference read Note 520813 - FAQ: BAPIs for goods movements

12. Question:

What do I have to keep in mind if I want to trigger the print output of  a goods receipt or goods issue document when I execute the BAPI?

Answer:

You must make sure that a user name is transferred in the PR_UNAME field  in the header structure. This user is used for determining the print  parameters. You must set the value 'X' for the 'NDR' parameter ID for  this user. Make sure that all customizing-related settings have been made for this user.

The GOODSMVT_CODE import parameter is relevant for the print version.  The transaction code is derived from this code (see table T158G, for example, code 04 stands for MB1B). The BAPI uses the print version that is assigned to this transaction for the goods receipt/goods issue document. This is customized in transaction OMBR. Check your Customizing and make sure that you have assigned a print version to this transaction and that a conditional output record exists.

Also Note 522591 - FAQ: IM output determination can be useful.

Regards,

Raymond

PS: The problem of the previous thread was relative to printing RETURN messages, success and error, not IM output types.

Read only

0 Likes
1,425

Hi Raymond,

thanks for your reply.... my report is working for MB01 tcode( means movement code eq '01' and movement type is '101' but it is not working for MB1A tcode(means movement code eq '03' and mvmnt type is 551.

for the Tcode MB1A, I have checked the print verson in OMBR.. it is ok.... I think some more data is missig in some tables but I could not find where it is............

so please help me to fix this............ @

Raymond Giuseppi

Regards,

Ramki

Read only

0 Likes
1,425

If same parameters (conforming to the OSS note I mentioned) work for one code and not the other, it looks like a bug, you may consider raising an OSS message ?

Regards,

Raymond

Read only

Former Member
0 Likes
1,425

Hi Guys,

I have debugged the BAPI and found that some values are missing in table B072 and NACH..........

I maintained the entries.. now it is working..

regards,

Ramki