Hi Rich, I know you said only Gentran:Basic answers, but I want to try to help. Can you read the GS or ISA? We use SAP as well and for a few customers who don't send the mandatory ship to, we've used the value in the GS. That should take care of your hard coded problem, I'd think.
Good Luck, Leah ________________________________ From: Michael Mattias/LS <[email protected]> To: EDI-L <[email protected]> Sent: Sat, February 5, 2011 6:21:51 PM Subject: Re: [EDI-L] Mapping output where no input segment exists > The map already makes provision for the N1 segment in it. That's not > the issue. > > Take a look at the second interchange I provide. **THE N1 IS NOT > PRESENT**. How can I map something that's not there? That's like > saying "Everybody who's not here, raise your hand." :) > > Gentran:Basic is a funny animal. I came from the Mentor product, so I > do have experience with at least one other mapping tool; but this one is > pretty different. Actually, no it isn't. "Do <something> when <something else> is not found in the input" is actually a fairly common mapping challenge (outside the classroom in The Real World). Most mapping tools will have a Present() or Exists() or found() or MIssing() or absent() function, or allow you to do what in Sql/Server is a "nullif"... provide a list of 'source' data to be mapped to the 'target' , selecting the first non-null item in the list. In your case your map logic needs to be, If Missing( N1 Segment), map "MISSING" else map N1Segment I'm not familiar with your specific tool. If it does not have one of the functions above, perhaps you can set a flag when you get the N1 Segment. If that flag is false when you think you are done, you are not done: you have to set the default values to account for the absence of that N1 segment. Something like that, anyway. Michael C. Mattias Tal Systems Inc. Racine WI [email protected] [Non-text portions of this message have been removed] ------------------------------------ ... Please use the following Message Identifiers as your subject prefix: <SALES>, <JOBS>, <LIST>, <TECH>, <MISC>, <EVENT>, <OFF-TOPIC> Job postings are welcome, but for job postings or requests for work: <JOBS> IS REQUIRED in the subject line as a prefix.Yahoo! Groups Links <*> To visit your group on the web, go to: http://groups.yahoo.com/group/EDI-L/ <*> Your email settings: Individual Email | Traditional <*> To change settings online go to: http://groups.yahoo.com/group/EDI-L/join (Yahoo! ID required) <*> To change settings via email: [email protected] [email protected] <*> To unsubscribe from this group, send an email to: [email protected] <*> Your use of Yahoo! Groups is subject to: http://docs.yahoo.com/info/terms/
