11-11-2008 2:19 AM
Hi All,
I'm working on posting of invoice document.But my problem is how to write the coding for posting a document?
The requirement is like this:
When the user with roles u2018MM_RELEASE_INVOICEu2019 login MIR4,
1. to check the authorization user id with roles u2018MM_RELEASE_INVOICEu2019
2. if roles u2018MM_RELEASE_INVOICEu2019 exist for id, then program should check vendor code LIFNR and company code BUKRS, compare to LFB1- LIFNR and LFB1- BUKRS, then ignore the tolerance group LFB1- TOGRR. User will be able to post the data without any error and checking of LFB1- TOGRR.
And my coding is:
IF AGR_USERS-AGR_NAME = 'MM_RELEASE_INVOICE' .
SELECT * FROM LFB1 INTO TABLE IT_LFB1 WHERE LIFNR = RBKPV-LIFNR
AND BUKRS = RBKPV-BUKRS.
IF IT_LFB1-LIFNR EQ RBKPV-LIFNR AND IT_LFB1-BUKRS EQ RBKPV-BUKRS.
HAVE TO CODE HERE FOR POSTING.
ENDIF.
ELSE.
MESSAGE 'YOU ARE NOT AUTHORIZED TO POST' TYPE 'E'.
ENDIF.
Thanks,
srii...
11-12-2008 1:35 AM
11-12-2008 9:56 AM
11-13-2008 6:39 AM
Hi,
have a look at BAPI_INCOMINGINVOICE_CREATE.
You can find many threads about this bapi in the abap forum.
Best regards.
11-13-2008 7:40 AM
I tried with that but Unable to solve..
if anything else let me know please..
Thanks,
sriii...
11-19-2008 1:54 AM
11-19-2008 7:12 AM