SAP for Oil, Gas, and Energy Discussions
Connect with fellow SAP users to share best practices, troubleshoot challenges, and navigate the evolving energy landscape. Join the conversation today!
cancel
Showing results for 
Search instead for 
Did you mean: 

Issue in two step transfer gain posting through BAPI..

Former Member
0 Kudos

We are using two step transfer process with STO. During development of this process, we were able to test and confirm that when the GR is greater than GI, the system posts 101 for total qty; the excess qty (gain posting) automatically happens (with 858 movement) after posting material document.

For example, if goods issue is for 200 units and goods receipt is for 205, the 101 movement is posted with 205 units and once material document is posted, we get two lines as below.

101 mvt - 205 units

858 mvt - 5 units representing the difference between GI and GR.

But during the technical development process, we are having issue when posting through the BAPI_GOODSMVT_CREATE_OIL. While we are able to populate the GR qty with 101 movement, 858 being an automatic movement, we could neither post it through BAPI nor it is populated automatically.

Is there any specific field required to be populated for getting this gain posting with 858 mvt or any other settings needed in BAPI ? Appreciate any inputs.

Thanks.

1 ACCEPTED SOLUTION

Former Member
0 Kudos

Hi Arun,

Ideally, the posting of the appropriate gain mvmt type happens if you have checked the "Vehicle close flag" and "gain/loss at close" indicator in your shipment. This can be defaulted at your TD shipment type or you can manually set it during Delivery Confirmation.  You may want to include these indicator check in your BAPI settings.

On why the gain for two-step STO is posting +858, that you may want to check in the Intransit posting group which is assigned to the TD bulk shipment used, whether a different movement type has been assigned to it instead.

If unaltered, for a two-step STO, the system would ideally post an 851 movement type for Intransit Loss at Receiving Plant Header and 552 for intransit gain at actual Receiving Plant/SLoc during Delivery Confirmation.  

Please see the example below for two-step STO:

For a two-step STO, system would ideally post movement type 641 to the Receiving Plant (Header) during Loading Confirmation, and then during Delivery Confirmation it would post a gain (if any) at Receiving Plant/SLoc with 552 mvmt type.

Check in config: Industry Solution O&G -> TD -> TD Bulk Shipment -> Intransit Stock -> Define Intransit Posting Group accordingly if any other movement types has been maintained there for loss/gain posting.

Hope the above helps.

Thanks.

View solution in original post

8 REPLIES 8

Naresh_Jangam
Participant
0 Kudos

Dear Arun,

Did you set ' Final delivery inidicator' in the Bapi to post the automatic Gain/loss posting.

Regards,

Naresh Jangam

IS-OIL SAP Consultant.

Former Member
0 Kudos

Hi Arun,

Ideally, the posting of the appropriate gain mvmt type happens if you have checked the "Vehicle close flag" and "gain/loss at close" indicator in your shipment. This can be defaulted at your TD shipment type or you can manually set it during Delivery Confirmation.  You may want to include these indicator check in your BAPI settings.

On why the gain for two-step STO is posting +858, that you may want to check in the Intransit posting group which is assigned to the TD bulk shipment used, whether a different movement type has been assigned to it instead.

If unaltered, for a two-step STO, the system would ideally post an 851 movement type for Intransit Loss at Receiving Plant Header and 552 for intransit gain at actual Receiving Plant/SLoc during Delivery Confirmation.  

Please see the example below for two-step STO:

For a two-step STO, system would ideally post movement type 641 to the Receiving Plant (Header) during Loading Confirmation, and then during Delivery Confirmation it would post a gain (if any) at Receiving Plant/SLoc with 552 mvmt type.

Check in config: Industry Solution O&G -> TD -> TD Bulk Shipment -> Intransit Stock -> Define Intransit Posting Group accordingly if any other movement types has been maintained there for loss/gain posting.

Hope the above helps.

Thanks.

0 Kudos

Thanks a lot Kok Wai and Naresh for your quick response.

Naresh - yes, final transfer indicator is set.

Kok Wai - Sorry, I did not mention that we work without TD. The O&G HPM is configured and material movements are carried out with Inventory Management.

The process is as below.

1. STO is created.

2. Post GI against STO - this moves stock to in-transit.

3. Post GR against STO - we see only 101 mvt line during MIGO and when the posted GR qty is greater than GI qty, after posting the document, we would see the 858 line added, as in screen below.

4. But when we post the 101 movement using BAPI, we get only the 101 mvt and not the 858 mvt.

5. Moreover, 858 being an automatic one, even if tried to post using BAPI, it errors out stating "858 cannot be posted manually".

Appreciate all your help. Thanks.

0 Kudos

Hi Arun,

OK, now that you mentioned. Well, ideally then it should automatically post the relevant movement type 858 where there is an adjustment. Can you check in OMJJ under Field Selection (Enjoy) whether the required fields set (by standard is cost center) for the concerned movement type 858 has been populated accordingly in your STO.

You may try posting manually using the tcode MIGO (under allowed transaction) to checkif there are any errors while posting 858 movement type that could have possibly prevented the automatic 858 movement type posting.

In addition, you may also refer to this SAP documentation (page 10) for more information.

Hope the above helps.

Thanks.

0 Kudos

Thanks again Kok Wai. As mentioned earlier, manually this is working fine - after we post 101 mvt in MIGO, 858 mvt is added to the material document as adjustment. (of course, if GR > GI). But when we post 101 through BAPI, adjustment with 858 mvt is not posted. Knowingly, I tried posting 858 also through BAPI and got an error message stating '858 cannot be posted manually'.

With this information, logically, SAP system should post 858 automatically even when 101 is posted through BAPI. OMJJ settings seems to be fine; we added tracking number config to it. Release notes were referred already and no helpful info to this issue.

Appreciate your help. Thx.

0 Kudos

Hi Arun,

Can you also assist to check few things:

  • Check if the IDoc has been processed completely? Check in the log if there is message saying that the IDoc is still being processed.
  • Check if the Delivery Completed (ELIKZ) indicator has been set. I believe due to the difference between the GI and GR quantity, the BAPI has not automatically set this status, and hence the relevant 858 movement are also not posted.  Ideally, the Delivery completed and Final Delivery check should be checked.
  • Check also in the BAPI settings during GR that the indicator for Final transfer MSEG-OIFTIND = X is populated accordingly.
  • Check through the SAP Note 1031878 to ensure that the debit/credit indicator for the movement types are also properly set/not changed.

Hope the above helps.


Thanks.

0 Kudos

Hello Kok Wai,

Sorry for the delayed response. Here is my response.

1. We do not use iDocs. Only standard BAPIs.

2. Delivrey completed indicator is set in the BAPI.

3. Final transfer indicator too is set.

4.Referred to table T156 per note; did not find issues with 858 movement.

In the last few days, we debugged the standard program and were able to find that there are 3 different qty fields to be populated for getting the automatic movement (858) to be posted. But in debug mode we got the 858 line; but now we are ending with O3 359 error "Material && / Plant && Column 00002: MSEG-KG not in qty table/not consistent". Trying to fix this. While going through MSEGO2 table, we could not find issues in the conversion. Appreciate any idea on this.

Thanks.

0 Kudos

Hi Arun,


There seems to be inconsistencies possibly in your loading confirmation stage, for UoM "KG" updated in the OIGSVMQ-LGMNG against what is updated in the additional quantities in OIGSVMQO2, MSEG & MSEGO2 tables, hence the error.  You may want to check in those tables for TD action = 2 or 5. 

Hope the above helps.


Thanks.