cancel
Showing results for 
Search instead for 
Did you mean: 

Adding segment in Outbound IDOC in CAR with customer enhancement.

former_member638484
Participant
0 Kudos

Our customer is a pharmacy who uses GK as a point of sale. The cycle of sales starts with POS in GK, the GK sends XML file to the PI, and PI send the data through RFC to CAR, and CAR sends the data to the S4 through IDOC. Our developers made customers enhancements where they add fields related to the insurance, like Insurance number and customer name. These fields reach the CAR fine, but the idoc that goes out from CAR, not having these enhancements. My question is, how can i add segments in the idoc going out from CAR, carrying the enhancement fields.

Accepted Solutions (0)

Answers (3)

Answers (3)

former_member335292
Contributor

Hi Abdel,

You can use any of the below BAdI implementations for adding the custom segments, depending on the idoc message type you are planning to use

1./POSDW/BADI_OT_UMS_HDXX_ADD - WPUUMS Header segments

2./POSDW/BADI_OT_UMS_ITXX_ADD - WPUUMS Item segments

3./POSDW/BADI_OT_TAB_HDXX_ADD - WPUTAB Header segments

4./POSDW/BADI_OT_TAB_HDXX_ADD - WPUTAB Item segments

Hope it helps.

Thanks,

Aram.

former_member190293
Active Contributor
0 Kudos

Hi!

If we're talking about WPUUMS/WPUTAB IDocs, it's worth noting that these IDocs are mostly used to send aggregated data to ERP. How are you going to send needed data in this case? At least, aggregation task should also be modified first.

If we want to send the data using, for example, IDoc WPUBON, it sends user extensions for retail positions using standard task implementation.

Regards, Evgeniy.

pramodu
Active Participant
0 Kudos

Idoc Type WPUUMS01 has E1WXX01 which is Segment for Customer Enhancements to be used as Required.

It has three fields

FLDGRP FLDNAME FLDVAL

You do not have create any custom segment rather use this segment to populate.

for your scenario Insurance number and customer name.

FLDGRP = 'INSGRP'

FLDNAME = 'INSNUMB'

FLDVAL = < Populate here what value>

FLDGRP = 'CUSGRP'

FLDNAME = 'CUSNUM'

FLDVAL = < Populate here what value>

These value need to fill in /POSDW/IF_BADI_PROCESS_PACKAGE~PROCESS_PACKAGE

which calls Class SE24 /POSDW/CL_WPUUMS_IDOC has Method SEND_IDOC

You need to implement this method by Click on Pre-exit and here check Message Type and Idoc type and populate FLDGRP FLDNAME FLDVAL the value as needed.

Thanks,

Pramod