2008 Nov 11 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...
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...
2008 Nov 12 1:35 AM
2008 Nov 12 9:56 AM
2008 Nov 13 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.
2008 Nov 13 7:40 AM
I tried with that but Unable to solve..
if anything else let me know please..
Thanks,
sriii...
2008 Nov 19 1:54 AM
2008 Nov 19 7:12 AM
| User | Count |
|---|---|
| 3 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |