on 2017 Mar 30 11:58 AM
Hi,
I am developing a IDOC to EDI scenario wherein I have a requirement to count the total numbers of target segments in the ouput EDI file and place this count value in a header field D_NOSG in the EDI S_MTR segment of parent segment DELHDR
The total number of segments in the output EDI is not constant. There is mapping logic for each segment. Each segment gets created based on a condition and few segments can occur multiple times also depending on certain input field value.
Can anyone please suggest how this can be handled in mapping.
Regards
Suchita
Request clarification before answering.
Hi Suchita,
Are you using the B2B add-on or some other option? We have a lot of ANSI x12 scenarios and place the value $B2B_SEG_COUNTER as a constant in the place where the dynamic segment count should be calculated. When the TransmissionNumberModule executes it does a count and replaces that constant with the proper value. I would assume it also works for the other EDI standards that are available in the add-on.
Regards,
Ryan Crosby
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Suchita,
Did you try counter function from Arithmatic functions?
Thanks,
Nishant
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Suchita,
Maybe there is a simpler solution but the first thought that comes to my mind is to create an another mapping step. After your first message mapping, a target message will be created, so it will be easy to count the total number of segments during the second message mapping.
Regards,
Andrzej
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
| User | Count |
|---|---|
| 17 | |
| 8 | |
| 7 | |
| 6 | |
| 4 | |
| 3 | |
| 3 | |
| 2 | |
| 2 | |
| 2 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.