bapi_alm_ordersrule_create

Logistics : PM and its sub-modules & SM

Moderators: Snowy, thx4allthefish, PJA

Post Reply
KDT
Posts: 103
Joined: Thu Jun 09, 2005 5:23 pm
Location: United States

bapi_alm_ordersrule_create

Post by KDT » Thu Feb 24, 2011 1:58 pm

Experts I need I your assistance. We are using the bapi to create the settlement rule of ibapi_alm_ordersrule_create and then function module k_settlement_rule_save to save it. The issue we're having is it's only creating settlement type PER for both lines instead of one line having the settlement type of FUL even though that is what we have for the information.

Does anyone have experience with the above bapi and function module that has had this issue? We certainly want to use both the PER and FUL settlement types.
Regards,
KDT

KDT
Posts: 103
Joined: Thu Jun 09, 2005 5:23 pm
Location: United States

Re: bapi_alm_ordersrule_create

Post by KDT » Thu Feb 24, 2011 6:28 pm

We got it to work. He used another function module to change the one PER to a FUL - appears to be working and will be testing more soon.
Regards,
KDT

PJA
Posts: 11383
Joined: Sun Jul 20, 2003 3:11 pm
Location: Deepest darkest Aberdeenshire
Contact:

Re: bapi_alm_ordersrule_create

Post by PJA » Fri Feb 25, 2011 3:46 am

KDT

Can you tell which FM you used, and which user-exit you used them in?

PeteA

KDT
Posts: 103
Joined: Thu Jun 09, 2005 5:23 pm
Location: United States

Re: bapi_alm_ordersrule_create

Post by KDT » Fri Feb 25, 2011 9:50 am

Peter,
Per the ABAPer he used the following 3 in this order:
K_POSTING_RULE_INSERT
K_SETTLEMENT_RULE_FILL
K_SETTLEMENT_RULE_SAVE
the first one will create it in buffer; but all with per
2nd one could be used to change per to ful
3rd one to save

Hope that might help others who are trying to do the same thing. We are using it to look at the recipient type that the equipment is located at. We're using ETM. So if the recipient type is a project the settlement rule is created using two different NWA's on the project with a source assignment. If the recipient type is tied to a cost center the settlement rule is to the cost center and if the recipient type is tied to an internal order the settlement rule is to the internal order.
Regards,
KDT

PJA
Posts: 11383
Joined: Sun Jul 20, 2003 3:11 pm
Location: Deepest darkest Aberdeenshire
Contact:

Re: bapi_alm_ordersrule_create

Post by PJA » Fri Feb 25, 2011 9:57 am

Yes, I've done it this way before too (although we used the K_SETTLEMENT_RULE_DELETE FM too).

But I was told that its also possible with the IBAPI* options (which call the above FMs anyway).

PeteA

Post Reply