on 06-12-2008 7:44 PM
I am doing file to idoc scenario.....where i have got stuck up...with 2 parts...
1. I need to validate the vendor name field coming from the sender.It can be any name.But,it should be filled with some name.........do we need to write a userdefined function...or is there any function i can use it...this is because,cremas idoc will be generated even thought if it comes without vendor name....
2. At the receiver,i have a segment.where i need to use it as unbounded....please do remember that i get only one vendor record at a time.....
EG: i need t o add a constant A for the segment1.
i need to add a constant B for the segment 1....I mean the segment is repeating......
<segment1>
<feild>A</feild>
</segment1>
<segment1>
<feild>B</feild>
</segment1>
can someone guide me.....
Edited by: PSRK on Jun 12, 2008 2:48 PM
>>It can be any name.But,it should be filled with some name.........
Use MapWithDefault here,if a name will come from sender system,that name will be transferred as it is,if no name comes in the default value will be transferred(you can give any default value)
>>At the receiver,i have a segment.where i need to use it as unbounded....please do remember that i get only one vendor record at a time.....
if i understood your question correctly you can use splitByValue here
Thanx
Aamir
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
>>i need to validate the vendor name filed and if nothing is present...then i should fail the mapping
well simply map it to some mandatory field on receiver side,i guess vendor Number is LIFNR.
if vendor number does not comes in,that mandatory field will not be populated and you will get mapping error.
if vendor number comes in the file,then it will be mapped to receiver and no error will be triggered
Thanx
Aamir
Hi Gaurav,
Thanks for ur reply....
here i am doing 1:1 mapping...
but, at receiver side,we need to map to a segment with 2 constant values....
Consider there is segment and a field under it...for the receiver..then we need to map with Constant A for first time...and constant B for the smae feild second time.....
u got it....
User | Count |
---|---|
85 | |
10 | |
10 | |
10 | |
7 | |
6 | |
6 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.