Skip to Content

Modifying Sales Document Flow

One of the requirement which I got was to modify the sales document flow and insert your customer object in the flow let’s call this as a ‘SAMPLE OBJECT’. This sample object was getting created via custom development. Once this ‘SAMPLE OBJECT’ was created there were follow up actions like creating sales order delivery etc and the requirement was to have it in the document flow.

So the search begins to implement this. Searched on SDN and other sites found little bit of pointers not much. So in the end thought of looking into it in the system.

  • Since it was all about modifying the SD document flow the first step was to go and look into VBFA table for the various document categories available in the domain VBTYP. There were various fixed values and i thought that i will need an access key to modify the same.
  • But still my mind was looking for another way out. I tried the various menu buttons in the domain and found we can add values to the domain without a modification. Bingo the first step was achieved. Create append for domain values and inserted it.
  • Next target was how to get the document number of preceding document in the document flow of sales order. We were using the BAPI BAPI_SALESORDER_CREATEFROMDATA to create sales order and i found the field in ORDER_ITEMS_IN tables parameter to pass the reference of the SAMPLE OBJECT document in the field REF_DOC, REF_DOC_IT and REF_DOC_CA. I tried it and Bingo it was there i can see my custom sample object there. But when i wanted to display that object it was not happening as obvious since it was a custom development so need to code for displaying or calling the transaction in order to display this sample BO. so the quest to find the right place begins.
  • Initially during debugging found one BADI BADI_SD_DOCUMENTFLOW and thought my work is almost done but sadly it was marked as for internal use for SAP. So have to look for another alternative. Although i tried doing it with implicit enhancement in this BADI but thought as it’s of internal use i should not try it.
  • So ultimately while debugging found one function module which was called RV_CALL_DISPLAY_TRANSACTION. I found an explicit enhancement spot ENHANCEMENT-POINT RV_CALL_DISPLAY_TRANSACTION_01 SPOTS ES_SAPLV06A. Implemented it and everything was coming fine 🙂

So ultimately was able to implement it. This blog is open for any new ideas to accomplish the same. Please feel free to give your opinion.

You must be Logged on to comment or reply to a post.