2010 Dec 02 7:05 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
2010 Dec 02 7:17 AM
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
2010 Dec 02 7:17 AM
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
2010 Dec 02 7:19 AM
2010 Dec 03 10:23 AM
Hi All,
I tried with the above options it is not working.
Regards,
Esh
2010 Dec 03 1:18 PM
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]
| User | Count |
|---|---|
| 4 | |
| 2 | |
| 2 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |