Thursday, October 29, 2009

SAP ECC6.0 : Y/C and Cross Stock in IDOC_OUTPUT_ORDERS

Today, I had to debug a function module IDOC_OUTPUT_ORDERS to determine why certain segments and its fields are not appearing especially when it is sending out for its Cross Stocks. In contrast to Y/C stocks, those segments are appearing normally. So I had to make a comparison on the flow of its coding during debugging.

As an initial start of debugging, I need to know what are the missing fields and segments. So I took 2 PO numbers and sent out Y/C and Cross Stock IDOCS. After sent out, execute WE02 to get the two comparison output of the following 2 IDOCS as below:


Figure 1.0 Missing Segments

The Figure 1.0 showed two screens of WE02 of 2 IDOCS of same basic type but sending out Y/C and Cross Stocks. On your right, the IDOC sent out Y/C and the left is Cross Stock. As you see, the Cross Stock (Left Screen) has several missing segments that is in Y/C type IDOC. These are those difference in segments missing. Following figure showed the missing fields in a segment.


Figure 2.0 Missing fields

Similar as above description in Figure 1.0 Missing Segments, Y/C had extra fields that Cross Stock type in IDOC_OUTPUT_ORDERS that is not appearing. These missing fields and segments are due to the following reasons: (The following segments are filled in subroutine fuellen_idoc_inttab)


1.0 E1EDK01 (General Data)


Debug 1.0 General Data

E1EDK01 segments that is supposed to be filled in Cross Stock is not filled due to FLAG_PSTYP_STR not fullfilled. As a result, E1EDP-VSART and E1EDPK01-KZAZU are not filled in Cross Stock for IDOC (Orders).


2.0 E1EDKT1 (Document Text, Third Party)


Debug 2.0 3rd Party Document Text

Segment E1EDKT1 that is supposed to be filled in IDOC for Cross Stock not appearing is due to the coding above which FLAG_PSTYP_STR and SO_COUNTER is not fulfilled as in IDOC for Y/C. However, VBAK had to be fulfilled to in order to get the segment for Cross Stock.


3.0 E1EDP02 (3rd Party Order)


Debug 3.0 (A)

Segment E1EDP02 that is supposed to appear in IDOC for Cross Stock had been skipped because EKPO-PSTYP does not equal PSTYP-STRE. This is the first checking that initiates the rest of filling of segment E1EDP02.


Debug 3.0 (B)

After the Debug 3.0 (A) had initiate, this is the portion Debug 3.0 (B) that will fill E1EDP02 in Cross Stock. However, this only occur in IDOC for Y/C.


4.0 E1EDPT1 (Text for 3rd Party Order)


Debug 4.0 Text for 3rd Party Order

This is the last segment that is supposed to be filled in IDOC for Cross Stock but not appear at all. Similar to previous filling of segment's condition, SO_COUNTER and EKPO-PSTYP must also matched PSTYP-STRE before this segment be fill into IDOC for Cross Stock.

This is the analysis as the reason IDOC (IDOC_OUTPUT_ORDERS) not appearing for Cross Stocks. Functional should be make understand this findings and hopefully they will do the necessary adjustment or configurations to enable Cross Stock have those missing fields and segments be filled up during publication from ME21N or ME22N. Another options, there might be a possible enhancement to this IDOC. Each segments has a BADI or USER EXIT that allow you to make the necessary enhancement to fulfill your business requirement.


williamwilstroth... IDOC_OUTPUT_ORDERS, missing segments...

Friday, October 9, 2009

SAP SRM550 : Shopping Cart Assessing PO...

I had initially wanted to write about my experience in accessing a PO from EBP to ECC6 system about a year ago but ECC6 rollout project had tied up all my time. So here it is. EBP is totally whole different environment. Table wise, transparent tables like EKKO and EKPO are not available. Most data accessed by EBP are extract via BBP RFC function modules from ECC6 (standard system).

Therefore, EBP (SRM) development revolves largely around BBP's BAPI and RFC functions modules*. It is quite an interesting system on the overall and it is worthwhile exploring and expanding your SAP universe. It is not just ECC6 alone because there are other several industry specific system spawn out from ECC6.

Coming back to my Shopping Cart Report, there are several function modules that you can use to extract data from ECC6:
1. FM : BBP_PROCDOC_GETLIST
2. FM : BBP_PD_PO_GETDETAIL
3. FM : META_PO_GETDETAIL

Each of this function module in EBP has a different and important role in reporting or process development.

1.BBP_PROCDOC_GETLIST has a parameter that allows you to obtain shopping cart no and several other SC item information.
2.BBP_PD_PO_GETDETAIL obtains PO No and information from PO Header. This ties to the SC.
3.META_PO_GETDETAIL refers to information extract of PO line items. This can be a query resultant of second function module BBP_PD_PO_GETDETAIL. However, one can try to query out this FM from the first function BBP_PROCDOC_GETLIST.

* BAPI is an encapsulated function module with a layer of RFC and published in the Business Object Repository


williamwilstroth... SRM, EBP...