on 11-11-2016 1:08 PM
Hi,
I am trying to issue an existing permit of a PM Order programatically (manual equivalent: IW32). The FM BAPI_ALM_ORDER_MAINTAIN has a parameter IT_PERMIT_ISSUE, but also a statement in documentation: "Permits cannot be processed". Did anyone succeed in issuing a permit? If not by this BAPI, is there another way? If yes, preferably share an example.
Thanks!
KR,
Igor
Hello Igor
Yes the Issueing of Permits should work via the BAPI "BAPI_ALM_ORDER_MAINTAIN" ...
See the following Sample-code :
CLEAR ls_method.
MOVE '1' TO ls_method-refnumber.
MOVE 'PERMIT_ISSUE' TO ls_method-objecttype.
MOVE 'CREATE' TO ls_method-method.
MOVE <order_id> TO ls_method-objectkey.
APPEND ls_method TO lt_methods.
CLEAR ls_permit_issue.
ls_permit_issue-permit = <permit_id>
ls_permit_issue-issued_by = <username>.
APPEND ls_permit_issue TO lt_permit_issue.
CLEAR ls_method.
ls_method-refnumber = '1'.
ls_method-method = 'SAVE'.
APPEND ls_method TO lt_methods.
CALL FUNCTION 'BAPI_ALM_ORDER_MAINTAIN'
* DESTINATION 'NONE'
TABLES
it_methods = lt_methods
return = lt_return
it_permit_issue = lt_permit_issue.
This sample only has the 'essentials' but this should work ... Followed by Check ReturnParams and Commit or Rollback ofcourse ...
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
99 | |
9 | |
8 | |
5 | |
4 | |
3 | |
3 | |
3 | |
3 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.