cancel
Showing results for 
Search instead for 
Did you mean: 

IDOC segment field with blank value

0 Kudos
5,567

Hi Members,

I have gone through lots of threads but didn't have a solution OR solutions (answered) were not worked out.

Sorry if it is repetitive or this should not be posted.

My requirement is to display a ZZ custom field in the Invoice outbound IDOC segment <Z segment> field.

The ZZ custom field is a customer master->Billing Plan check box field.

If checked, it should display as "X" . This is flowing correctly. Ex in IDOC: Zsegment-ZZFIELD X

If not checked then it should display as Blank. But the IDOC segment the field itself (Zsegment-ZZFIELD) is not appearing.

The business requirement is to flow the segment field even if it is initial or blank value or not checked.

Note: I have heard that, if the field is a non-mandatory and not has F4 pre-defined values then the system will allow to display/flow the segment field with blank in IDOC.

Please help with your feasible solutions/answers.

Thanks in advance.

Sandra_Rossi
Active Contributor
0 Kudos

Did you define your Zsegment mandatory in the idoc type extension?

Sandra_Rossi
Active Contributor
0 Kudos

You say "the field [...] is not appearing", but where do you see it's not appearing? WE02/WE05 do not display the fields with an empty value, but the fields do exist anyway. So, if you see Zsegment in the IDoc, then the field is present anyway and sent to the target system(s).

By the way, I don't understand what means Nawanandana Edirisinghe when he says that "the ALE framework is smart enough to ignore the fields in the IDoc segment with no values".

Sandra_Rossi
Active Contributor
0 Kudos

Is your "business requirement" to change the behavior of WE02/WE05 ? Just tell them that the blank fields are not displayed in WE02/WE05, it's easy to understand and I don't see why it would be a problem for business.

You cannot change this behavior (or only by altering the standard program).

Anyway, as I said, the blank fields are sent to other systems.

0 Kudos

Hi Sandra Rossi,

It is not a mandatory segment.

We are populating the segment and its field values through E1EDK01 customer function user-exit program.

Hi Andy,

Thanks for your valuable answer.

Yes, I do know that and also another option to send 'Y' as value indicating as Not checked (as 'X' indicating the field is checked). But before to take it as final solution, I am trying to see the solution with Blank or not. Later, I should not be questioned if I confirmed that as no solution other than '\' or 'Y'.

Thanks.

0 Kudos

Hi Sandra Rossi,

I am really sorry that I typo a wrong info here.

My Z segment is a NON mandatory segment.

What I understood from your comment that,

Though the Z segment field was not flown in WE02/05 but it has shown in the third party system . It is just a standard SAP behavior which will not show in WE02 whereas the field is available and seen in the third party system file . Am I right?

Thanks.

pataselano
Active Contributor
0 Kudos

Hi MANIKANDAN RAJASEKARAN,

If you comment my answer, please comment under my answer. Please don't comment under another people answer.

It is SAP behavior. SAP will not send IDoc for empty segment.

Sandra_Rossi
Active Contributor
0 Kudos

MANIKANDAN RAJASEKARAN Yes you understood correctly what I said.

NB: I am not talking anymore about the "mandatory" attribute of idoc type/segment relationship, because I had initially misunderstood your question...

Sandra_Rossi
Active Contributor
0 Kudos

Why don't you define it as a "mandatory" segment?

Accepted Solutions (1)

Accepted Solutions (1)

pataselano
Active Contributor
0 Kudos

For blank value, please pass '/' value as no-data indicator. So, your Z-segment will send through IDoc.

0 Kudos

Hi Andy,

I am sorry for that action made. I was in hurry so I did it. I will make sure it won't happen again.

It is SAP behavior. SAP will not send IDoc for empty segment - I will take this point and closing the thread by accepting your answer to pass '/' value for blank.

Thanks.

Answers (2)

Answers (2)

0 Kudos

Hi Sandra Rossi,

Thanks for your comment.

Yes, my Zsegment is mandatory or populating under E1EDK01. Zsegment has 6 fields and populating the field(s) only if it has values in it.

One of the field they want to display in the Zsegment though it is initial or blank as value.

Please reply.

Sandra_Rossi
Active Contributor
0 Kudos

Please use the COMMENT button for comments, questions, adding details, etc., ANSWER is only to propose a solution, dixit SAP text at the right of the answer area.

0 Kudos

Hi Sandra Rossi,

PFA the images.

When it is 'X', the segment Z field is displaying. But if it blank, field is not displaying. It should display the segment Z field without value also. ZZPRINTLOG should display even if there is no value in Fld cont. column.

we02-fieldnodisplay.jpgwe02-fielddisplay.jpg

Is it possible?

Please reply.

Sandra_Rossi
Active Contributor
0 Kudos

cf my comment under your QUESTION.

p244500
Active Contributor
0 Kudos

Hi,

That's how SAP designed it - the ALE framework is smart enough to ignore the fields in the IDoc segment with no values. If you populate the blank fields with a text string i.e. something like "space" or "initial" via an User-Exit then design at the target system to process these fields with the business logic as per your requirement.

Or If your doing it with PI you can use function mapWithDefault -This function provides a default value, whenever the source element is not available.

Regards,

Nawa

0 Kudos

Hi Nawa,

Thanks for your reply.

If you populate the blank fields with a text string i.e. something like "space" or "initial" via an User-Exit then design at the target system to process these fields with the business logic as per your requirement. - Yes, and my segment Zfield is a single character field which has X or null value. We have written the source code in the E1EDK01 customer function exit which has the Zsgement under to that.

The Z segment has 6 Z fields and will populate the field only if that has values in it. But business requires to populate one field (which is a Zfield in the Customer master->billing data) thought it has Null value.

We have written like

if not knvv-zzfield is initial

Zsegment-zfield = knvv-zzfield.

else.

zsegment-zfield = ''.

endif.

Let me know if I need to do any other way to get the zfield in the idoc segment.

Thanks.