domingo, 28 de março de 2021

SAP: Posting Cost Of Goods Sold at Billing (Technical Steps)

 When should COGS (Cost of Goods Sold) be recognized?

Is it okay if we post COGS during Goods Issue although Sales Revenue is posted in another transaction (Billing)?

What if we post Goods Issue then the period ended before we do Billing?! Do we have to do manual adjustments?


Answer

According to the Matching

Principle, COGS and related Revenue must be posted in the same period

SAP standard setup is to post

COGS at Goods Issue BUT it can be changed

If your business cycle can

include Goods Issue without Billing in one period then change SAP setup to post

COGS at Billing instead of at Goods Issue


Technical Steps to Post COGS at Billing:

1) Transaction OBYC > GBB > VAX > Goods in transit account:

Switch the COGS account with a Goods in Transit Account, the goods issue entry will change to below


2) Transaction V/08 > Pricing Procedure > VPRS > Accrual Account Key:

Maintain a new account key and assign to VPRS


3) Transaction VKOA > Assign GL Accounts to the new Account Key:

Assign COGS account in the provision column and Goods in Transit in GL column


4) Change VPRS condition to accept accruals:

This tells SAP to post the VPRS value to the 2 accounts maintained in VKOA

The billing document will be posted as below

Source: https://www.linkedin.com/pulse/sap-posting-cost-goods-sold-billing-technical-steps-abdullah-galal/

How to Generate a Notification when any Business Partner/Vendor/Customer is changed in SAP S/4HANA

 Introduction

In SAP S/4 HANA there are some major change in Simplification. Simplification means getting rid of Redundant Functionality. One of this is the Introduction of Business Partner as Vendor/Customer/Employee. The below blog helps in Generating a Notification when any Business Partner/Vendor/Customer Is changed in SAP S/4HANA

 

Solution

Please go to Transaction Code BP and the search for any BP and follow the below steps in GOS

We get the Business Object of the Business Partner

Now let us go to Transaction Code PFTC to create a Workflow Template

Enter a Name for the Workflow Object starting with Z or Y  as it is custom

Now create a Container Element BP Referencing Business Object

Select Import and Export Flag

Now maintain the Entries below

Now maintain the Event Linkage

Now Activate the Event Linkage

Click on Workflow Builder

Now we right Click and create the Step

Double Click on Send Mail Step

Provide the below information as mentioned below

Provide the email address. I have hardcoded here for simplicity. Ideally you should define a Container element that will be populated programmatically

Now activate the Workflow Template

Now let us test it. We are making a change in the description.

Now let us check the Workflow Overview by following the below step.

Here is Workflow Log

 

Conclusion

 

This Tutorial can only be used for SAP S/4HANA. The concept can be used for other Business Process Also.

 

Below is the video version for Generating Notification for Business Partner Change

Below is the video version for Generating Notification for Purchase Order Change

Below is the video version for SAP Filter Change for Business Partner Notification

Source: https://blogs.sap.com/2020/11/07/how-to-generate-a-notification-when-any-business-partner-vendor-customer-is-changed-in-sap-s-4hana/

Automate your SAP Transaction Code Authorization Approval Process using Simple Workflow

 Introduction

In every Project you have worked or will work you will get this Error Message.

“You are not Authorized to use this Transaction Code”

General procedure after that if you have worked with SAP before, you will take a SU53 Transaction Code dump and send it to SAP Security Team or you create a Ticket/Request in your Requesting System.

If you do not know you bug the IT Department and they will tell you to do the above. For a long time I thought this thing need to stop. The solution below can help you to solve this issue by the most Sophisticated Technology SAP had and still has which is SAP Workflow. I am bragging about it as I am a SAP Workflow Consultant trying to learn little by little:)

Solution

First Login to SAP System.

In this Example I am using a Transaction Code

/IWNGW/BEP_DEMO

for which I am not Authorized as mentioned below.

 

Click on Help

 

Now click on Technical Information as mentioned below

Note down the Message Class and ID

Go To Transaction Code SWUY

 

Select Start

Provide the Area as Message Class and Message as Message Id we got from the Authorization Error.

After this Hit Continue

Click Complete

 

Workflow is generated and you give some meaningful information to Identify the Workflow Template. Please Save it

 

Now Click Workflow Builder

Right Click as mentioned below and Hit Create

Select Decision Task as mentioned below.

 

 

Provide the below Information as mentioned

Now Press Activate to Activate the Workflow.

Now is Testing Time.

Execute same Transaction code.

You get the Error message and now you hit Help Button.

Now click on Workflow Icon

 

This Triggers our Workflow Approval. Ideally you will have different Role/User who will Approve the Different Transaction Codes.

Conclusion

This can be used in both SAP ECC and SAP S/4HANA

 

Below is the Video version

 


Source: https://blogs.sap.com/2020/12/04/automate-your-sap-transaction-code-authorization-approval-process-using-simple-workflow/

Automated SAP EDI testing for S/4HANA conversion projects

 S/4HANA conversion projects are taking off with more and more companies moving to the latest version of the the famous SAP ERP system. On one hand this is a huge opportunity to start using the latest features but on the other hand it can be a challenge are the conversion process may require code or process changes. With S/4HANA Selective Data Transition projects companies are implementing more complex projects (new business functions, systems consolidations for merging many individual systems into a larger single instance or even doing carvouts where one system is split into a few simpler systems). The question is how can we make sure that the SAP EDI scenarios are working in the same way after the conversion as they did before the conversion?

 

Testing for S/4HANA projects

 

If we try to find out what parts of a typical S/4HANA conversion project can be automatically retested we may come into the conclusion that it can be very little as User Interface (UI) testing cannot be tested due to changes in the UI (SAPGui to Fiori/UI5). Is there anything left? What about the SAP interfaces (legacy, EDI, etc.)? Would those connections change after the conversion? Would EDI customers or vendors require a new set of messages to be exchanged after the S/4HANA conversion project? Most likely not. That’s why we have a great opportunity of retest that automatically with the use of SAP API testing tools like Int4 IFTT.

 

Scope of the SAP EDI test for the S/4HANA conversion project

 

There can be many changes to the SAP EDI interfaces during a typical S/4HANA conversion project:

a) custom code migration – custom ABAP code may need to be enhanced to work in the same way after the S/4HANA conversion

b) ABAP code updates – for consolidations, carvouts, code cleaning. Those changes can be very significant but still the SAP EDI interface need to work in the same way after the S/4HANA conversion project

c) change of the middleware – at the time of the S/4HANA conversion project companies want to change the middleware (from SAP PO to SAP Cloud Platform Integration Suite for example)

d) change of the integration technology – some companies want to replace IDOCs with other integration technologies (SOAP/APIs)

e) change of the EDI provider – some companies can use the S/4HANA conversion project to switch the SAP EDI interfaces from it’s own middleware to an EDI provider (Seeburger, Opentext, etc.) or do the opposite move.

In all of those cases SAP EDI scenarios need to be tested from end to end (SAP S/4HANA system and the EDI endpoint) but how to achieve it?

 

Automated SAP EDI testing for S/4HANA with Int4 IFTT

 

Int4 IFTT with it’s smart repeater and full SAP API testing virtualization functions can automate SAP EDI testing for all flavors of S/4HANA conversion projects. Int4 IFTT smart repeater function allows reprocessing the existing production SAP EDI messages on the new S/4HANA landscape and automated comparing of the results with the old landscape. Int4 IFTT virtualiazation on the other hand allows doing the testing in a very isolated way without availability of EDI business partners by completely emulating them for the testing purposes.

 

How does it work?

 

Step 1

 

At first we can start with collecting test cases based on current/old solution and store them in Int4 IFTT. Test cases can be quickly created based on existing production SAP EDI messages which means test case creating is almost completely scriptless as we already have all available test cases and just need to select them In Int4 IFTT. This approach is shown in Figure below.

 

 

Step 2 

 

After the S/4HANA conversion is finished we can automatically test all EDI messaged and all EDI customers in the following way:

 

a) for inbound – EDI to SAP ERP – messages – Int4 IFTT can rerun all (usually a few thousands) stored EDI messages for all SAP EDI B2B partners and validate the SAP business documents which got created as a result. In this scenario EDI B2B partners are completely virtualized and they don’t need to take part in the test.

 

b) for outbound – SAP ERP to EDI – messages – Int4 IFTT can repeat the output messages from existing SAP backend documents and compare the EDI outputs after the S/4HANA conversion with the EDI messages created from the same documents before the S/4HANA conversion took place. In this scenario EDI B2B partners are completely also virtualized and the EDI validation will be done completely by Int4 IFTT as shown in Figure below.

 

 

Result 

 

All testing results are immediately visible after the automated test run and depending on the test direction you can validate different things:

a) for inbound – EDI to SAP ERP – messages – where Int4 IFTT sends the test messages to the middleware or SAP S/4HANA system directly can you check if the new business document is exactly the same as the one created before the S/4HANA conversion as shown in Figure below.

As we can see the same EDI message created a new sales order in the S/4HANA system but the Plant number is different. That means that the S/4HANA conversion project changed something causing a difference when reposting the same EDI message. Now it can be validated with the SAP functional expert or SAP developer and the test can be easily repeated once the issue is found.

 

b) for outbound – SAP ERP to EDI – messages – where Int4 IFTT would repeat the SAP EDI message output from the existing transactions on the S/4HANA backend system (so the ABAP code creating the IDOC/SOAP messages would be also tested) we only need to automatically validate the EDI messages as shown in Figure below.

 

 

Summary

 

As you can see SAP EDI trading flows can be very easily retested for S/4HANA conversion projects in a fully automated way. Test Case creation can be done within minutes for thousands of existing messages and the regression test for thousands of messages (all B2B partners and all message type) will just take a few minutes.

 

Further Reference

SAP PRESS book: Testing SAP APIs: Strategy and Execution – where testing of SAP APIs for S/4HANA conversion use case is described in detailed

openSAP course: Virtualize and Automate Your SAP Testing Using Int4 IFTT  (7200 participants and over 1.000 certified) lesson – Week 2 – Unit 4: SAP S/4HANA Conversion Testing

SAP Insider: Automated Testing and Virtualization of SAP Application Interfaces in SAP S/4HANA Conversion Projects

Source: https://blogs.sap.com/2020/12/30/automated-sap-edi-testing-for-s-4hana-conversion-projects/

quarta-feira, 24 de março de 2021

How Minimum, Total shelf life works !! - Batches

 Purpose:

The purpose of this blog post is to explain the system behavior when we maintain minimum shelf life, Total shelf life in material master and  standard errors faced during GR when we maintain these data.

What is Total shelf life and minimum shelf life?

Total Shelf Life:-

Period for which the material will be kept in total that is, from the date of production to the shelf life expiration date.

When Values of minimum and total shelf life  are updated in  material master

The system assumes that the date entered upon goods receipt is the material’s date of production. It then calculates a shelf life expiration date from the date of production plus the total shelf life

SLED= Date of Production + No. of Days/Months/Years

When Values of minimum and total shelf life  are not updated in material master

The system assumes that the date entered upon goods receipt is the material’s shelf life expiration date.

In both cases, the system updates the shelf life expiration date in the batch master record and in the material document if the goods receipt is accepted.

Minimum Remaining Shelf Life:-

Minimum amount of time for which the material must be kept  upon goods receipt accepted by system.

The function of this field is to put check during any Stock Posting.

e.g.  Total shelf life of product is 24 Months and in material master minimum shelf life is 2 months.

So after 22 months from date of manufacturing system will not allow any stock posting.

 

Implementation of expiry date check at goods receipt can be done via two methods:

  1. Entry of manufacturing/expiry date during GR (MIGO)
  2. Entry of manufacturing/expiry date during GR (CO11N/COR6N)

In this blog post , we will go through the  scenario of  manufacturing/expiry date during GR (MIGO)

Configuration:

  1. SPRO–> Batch Management –> SLED –> Set Expiration Date check (OMJ5)

      2. Activate SLED check at 101 movement type = 1 (Enter and check manufacturing/expiry date

during GR)

Illustration: 

Case 1: Raw material procured from vendor with Minimum and total shelf life maintained in material master

 

 a) When minimum shelf life and total shelf life are, maintain in material master. It is mandatory to enter date of production during GRN else below error will be displayed.

b) Suppose posting date is on 11-06-2020 and date of production entered is in past for batch as 11-05-2020. System will display below error  and will not allow to do posting.

c) Suppose Date of manufacturing of batch entered is 12.05.2020

System will display below error message

d) When date of manufacturing is in future, system will display below error

Logically, production date cannot be greater than GR date. In order to change this  warning message into error, Message number will be changed from warning to Error in OMCQ transaction.

Once this change is done and will try to do GR again, system will display below error message

Case 2: When minimum and total shelf life is not maintained in material master

In this case, system will not ask to enter date of production. Shelf life and date of production can be updated as blank or it can be updated manually during GRN and same will be updated in batch master

Case 3: When minimum  shelf life is maintained in material master and total shelf life is blank.

In this case, system will ask to enter shelf life as minimum shelf life is maintained in material master

Suppose SLED entered is in past  say 19.05.2020, system will display below error

When SLED entered as  current date, system will display below error message

System will only allow to do posting as per minimum shelf life of 10 days

In this case, only expiry date will be updated in batch master.

Case 4 : Minimum shelf life is blank and Total shelf life is maintained in material master

This case is not allowed, as we have to enter put minimum shelf life

Conclusion:  We will be able to understand and analyze the system behavior when minimum shelf life and total shelf life data is  maintained in material master.

Thanks…. I hope you will like this blog post.

Any feedback or improvements in blog post will be highly appreciated so that it will be helpful to community members

 

Regards,

Amit Sharma

Source: https://blogs.sap.com/2020/07/15/how-minimum-total-shelf-life-works/