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

BAPI_GOODSMVT_CREATE No print

Former Member
0 Likes
4,183

Hi All,

I am using BAPI_GOODSMVT_CREATE to create material Document and I am unable to get Print .

I have checked config settings and everything fine and I am able to create Same Through MIGO tcode.

I filled these parameters in BAPI.

PR_UNAME

HEADER-VER_GR_GI_SLIP = '1'.

HEADER-VER_GR_GI_SLIPX = 'X'.

Regards,

Esh

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
2,218

Within the BAPI the table USR05 is checked for Parameter ID NDR(Print via output control in MM - Inventory management) it's the parameter ID linked to the field XNAPR.

To make it work just update the table USR05 with the required setting and then execute the BAPI.

Once the procecssing is done reset the value in the table to the default.

Geting and setting the parameter ID doesn't work.

This the code I have:

  • Store current value in temp variable

SELECT SINGLE * FROM usr05 WHERE bname = sy-uname

AND parid = 'NDR'.

old_prflag = usr05-parva.

  • Set the new value

usr05-parva = rm07m-xnapr.

UPDATE usr05 SET parva = usr05-parva

WHERE bname = sy-uname

AND parid = 'NDR'.

  • Execute the BAPI

CALL FUNCTION 'BAPI_GOODSMVT_CREATE'

EXPORTING

goodsmvt_header = gm_head

goodsmvt_code = gm_code

testrun = ' '

IMPORTING

materialdocument = g_mblnr

matdocumentyear = g_year

TABLES

goodsmvt_item = gt_item

return = gt_return

extensionin = gt_ext.

  • Set the print Parameter back

usr05-parva = old_prflag.

UPDATE usr05 SET parva = usr05-parva

WHERE bname = sy-uname

AND parid = 'NDR'.

Moderator message: directly updating SAP standard tables is not recommended!

Edited by: Thomas Zloch on Dec 2, 2010 11:53 AM

Hi All,

I am using BAPI_GOODSMVT_CREATE to create material Document and I am unable to get Print .

I have checked config settings and everything fine and I am able to create Same Through MIGO tcode.

I filled these parameters in BAPI.

PR_UNAME

HEADER-VER_GR_GI_SLIP = '1'.

HEADER-VER_GR_GI_SLIPX = 'X'.

Regards,

Esh

4 REPLIES 4
Read only

Former Member
0 Likes
2,219

Within the BAPI the table USR05 is checked for Parameter ID NDR(Print via output control in MM - Inventory management) it's the parameter ID linked to the field XNAPR.

To make it work just update the table USR05 with the required setting and then execute the BAPI.

Once the procecssing is done reset the value in the table to the default.

Geting and setting the parameter ID doesn't work.

This the code I have:

  • Store current value in temp variable

SELECT SINGLE * FROM usr05 WHERE bname = sy-uname

AND parid = 'NDR'.

old_prflag = usr05-parva.

  • Set the new value

usr05-parva = rm07m-xnapr.

UPDATE usr05 SET parva = usr05-parva

WHERE bname = sy-uname

AND parid = 'NDR'.

  • Execute the BAPI

CALL FUNCTION 'BAPI_GOODSMVT_CREATE'

EXPORTING

goodsmvt_header = gm_head

goodsmvt_code = gm_code

testrun = ' '

IMPORTING

materialdocument = g_mblnr

matdocumentyear = g_year

TABLES

goodsmvt_item = gt_item

return = gt_return

extensionin = gt_ext.

  • Set the print Parameter back

usr05-parva = old_prflag.

UPDATE usr05 SET parva = usr05-parva

WHERE bname = sy-uname

AND parid = 'NDR'.

Moderator message: directly updating SAP standard tables is not recommended!

Edited by: Thomas Zloch on Dec 2, 2010 11:53 AM

Read only

RaymondGiuseppi
Active Contributor
0 Likes
2,218

Try to add a

SET PARAMETER ID 'NDR' FIELD 'X'.

before calling BAPI.

Regards,

Raymond

Read only

0 Likes
2,218

Hi All,

I tried with the above options it is not working.

Regards,

Esh

Read only

0 Likes
2,218

If that does not work in your system (did you check OSS for notes), put a user name in PR_UNAME field in the header structure, check NDR parameter ID is set for this user,

Regards,

Raymond

Ref : [Note 520813 - FAQ: BAPIs for goods movements|https://service.sap.com/sap/support/notes/520813] and [Note 522591 - FAQ: IM output determination|https://service.sap.com/sap/support/notes/522591]