‎2011 Jun 07 9:35 AM
Hi Experts,
when we create a line item in purchase order with zero price. IDOC segment which contain price data is missing. but as per business requirement Zero Price segment should appear in IDOC.
Please let me know the process of displaying blank or initial price Field in segment in an IDOC.
I am new to IDOC, so please help how to solve this.
Thanks,
Tirumala
‎2011 Jun 07 12:29 PM
Hi what you can do is pass the segment blank value i.e.:
ZE1KOMG-KSCHL = ' '.
The above value can be passed only if your field domain is of Char or NUMC type.
The example below can help you:
Take an internal table and work area of TYPE EDIDD. Take another work area of your segment type.
ze1komg type ze1komg, "This is the work area for segment ze1komg
it_edidd type table of edidd, "Internal table and work area of type EDIDD
wa_edidd type edidd.
Pass the value to the field of your segment
ze1komg-kunnr = wa_ct_time-vakey.
ze1komg-kschl = ' '.
Pass the segment to edidd internal table
wa_edidd-segnam = 'ZE1KOMG'.
wa_edidd-sdata = ze1komg.
append wa_edidd to it_edidd.
and pass the internal table to function module
'COMMUNICATION_IDOC_CREATE'.
‎2011 Jun 07 10:52 AM
‎2011 Jun 07 12:29 PM
Hi what you can do is pass the segment blank value i.e.:
ZE1KOMG-KSCHL = ' '.
The above value can be passed only if your field domain is of Char or NUMC type.
The example below can help you:
Take an internal table and work area of TYPE EDIDD. Take another work area of your segment type.
ze1komg type ze1komg, "This is the work area for segment ze1komg
it_edidd type table of edidd, "Internal table and work area of type EDIDD
wa_edidd type edidd.
Pass the value to the field of your segment
ze1komg-kunnr = wa_ct_time-vakey.
ze1komg-kschl = ' '.
Pass the segment to edidd internal table
wa_edidd-segnam = 'ZE1KOMG'.
wa_edidd-sdata = ze1komg.
append wa_edidd to it_edidd.
and pass the internal table to function module
'COMMUNICATION_IDOC_CREATE'.