Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

IDOC blank segment not displaying.

Former Member
0 Likes
1,415

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

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
799

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'.

2 REPLIES 2
Read only

former_member404244
Active Contributor
0 Likes
799

Hi,

You need to pass '\' in the empty fields.

Regards,

Nagaraj

Read only

Former Member
0 Likes
800

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'.