Skip to Content
0
Former Member
Nov 11, 2008 at 02:19 AM

MIR4 POSTING

484 Views

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...