Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

SDQ Multiple Store IDs Gentran mapping help 1

Status
Not open for further replies.

kclark747

Programmer
Jan 13, 2003
9
0
0
US
I am doing mapping of a 4010VICS 850 that uses the SDQ record for multiple store IDs.
I think that I need to create a temporary record and use Extended Rules to copy the data to the temp record, but I am unsure of how I would correctly do this.

At what level do I create the temp record?
At the same level as the SDQ?
In a group that is at the same level as the SDQ?

What would be an example of the Extended Rules used to copy the data to the temp record.

Thanks.
Kevin Clark
 
Hi

I know that there comes a example together with the Mercator software that should, I don't remember which example it is, but there is also a description of that file in the documentation (online library).

//Holger
 
I am using Gentran, but thanks for the reply.

I have managed some progress. I set up nesting PO1 groups (with all thier sub groups and records) and I set up nesting output file groups.
I then created a group called Temp for each PO1 group and mapped the SDQ elements to different iterations of the Temp group's record.

This seems to work fairly well, with only one strange problem.
I only get the first 3 SDQ pairs (Store # and Quantity) for each PO1 group.
I can't figure out why I can get 3 , but not all 6 that are in my test EDI file.

Anyone have any ideas or better ways of setting up mapping for this?

Thanks
Kevin Clark

 
The first question, though, is what does your output look like/require?

Many folks have a single PO approach in which case you would need to do quite a bit of extra work here. Others allow multiple destinations in a single PO.

So, first tell us what your output needs to be.
 
For my output I need to make a flat file that can only have one ship to destination.
I generate a record that contains the entire order and shipto info for each line item. The next line item generates a new iteration of that record.

I have a workable solution, but it is cumbersome and am wondering if there is a way to streamine it. (I've got a lot of maps to do.) Heres what I am doing now.

I have created nesting PO1 groups that only have one iteration each. I have created a TEMP group in each PO1 group that repeats 10 times (one for each SDQ element).
I also created nesting output records to match the nesting PO1 groups.
I map the SDQ elements to subsequent iterations of the TEMP group. I included an IF extended rule that IF the SDQ 0380 element (Quantity) is = 0 then delete the TEMP iteration that I mapped it to. I was getting the full 10 iterations of the TEMP group generating 10 output records even if the TEMP elements were empty, but this extended rule has fixed that.
Then I link the TEMP elements to the shipto and quantity ordered elements in my output record.

The main problem is it takes a large amount of time to add a PO1 group and adjust all the extended rules to match the new iteration's name. What can be done to streamline this?

Thanks
Kevin Clark
 
Kevin,

I don't know if you have access/ability to write your own programs, but here what we do and it has worked *great* for years.

1) Generate map to output to a text file the data from the po where you have a record for po1 and then subsequent records for each subordinate sdq. Each sdq record would have possible 10 pairs (store/qty).

2) Separate program would read text file and save common 'header' info (po, dates, etc). When it gets to po line and seq segments you would sort them into a temp index file by store,sku,qty (and what ever other info you need).

3) Using common header info and reading through temp index you created above you would now sequencially read through and create a 'order' for each store (since temp index now has all stores skus grouped together). Just break and create a new order when temp index store changes.

** Note if you can't create a index file in #2 above, maybe just create another text file with fields (store,sku,qty) and run some type of text sort to get it into store,sku sequence.

This works great for us because the mapping part becomes very standard and easy. Once you try to do TOO much data manipulation with the gentran mapper it becomes difficult and prone to exceptions/errors. Two easy steps/programs are better than 1 complicated one!

Let me know if you need more help/info.


LEE
 
I have been working on this and have modified my process of mapping this. I now only add a Temp group(with a Store element and Quant element) just above the CTT group. Every thing else is left to the EDI specs. It works great for the FootLocker map I was working on.
I have created a single Extended Rule that I put in a element of the SLN record that is between the SDQ record and the temporary record I added. The problem is in that there is no record between the SDQ and temporary record in the spec for BBandB.

If I put my Extended Rule in the On Begin of the SDQ record, it will only give me output for the first SDQ if there is a second SDQ record for that PO1 (It does not give any part of the second SDQ record though). I cannot determine why this happens or what to do to fix it.

This is the Extended Rule:

INTEGER I;
INTEGER C;
I=1;
C=1;
WHILE I<501 DO
BEGIN
if $SDQ[INDEX(1)].#0380:5>0 then
BEGIN
$TEMPGRP[INDEX(1)][C].#STORE=$SDQ[INDEX(1)].#0067:2;
$TEMPGRP[INDEX(1)][C].#QUANT=$SDQ[INDEX(1)].#0380:5;
C=C+1;
END
if $SDQ[INDEX(1)].#0380:6>0 then
BEGIN
$TEMPGRP[INDEX(1)][C].#STORE=$SDQ[INDEX(1)].#0067:3;
$TEMPGRP[INDEX(1)][C].#QUANT=$SDQ[INDEX(1)].#0380:6;
C=C+1;
END
etc... for all 10 SDQ element pairs.
I=I+1;
END

Thanks for reading through all this.
Also thanks to everyone who replied before.
Kevin
 
Hi Kevin,
I am new to Gentran EDI. I have the same problem of mapping an inbound PO to an IDOC. We want to seperate out the orders based on the shipto and create smaller POs out of that. Please advise.
Appreciate your help.
Sandra.
 
In Gentran the easiest way to accomplish what you are trying to do, is to create variables for all the PO information needed, and then when the first SDQ is read, create a complete PO for it from the variable information, read the next SDQ, create a complete PO for it... etc.

I have done this for both 850's, and 830's, not much fun to code, or debug, but works fine.
 
Sandra,

I have a sample that you could look over, but the application file in the map is for BaaN, and may not be that good of an example. Let me know what you think
 
Sandra,

How would you suggest that I let you see, as email address, and such are not suposed to be posted here?
 
Put the files on a public FTP site, and after Sandra downloads, delete the files?



BocaBurger
<===========================||////////////////|0
The pen is mightier than the sword, but the sword hurts more!
 
Hi Dave,
Could you put that map up please. I am running out of ideas and options here. It would help me a lot.
Thanks
 
Hi Kevin,
I am trying out the solution you have provided. When I create the extended rule on an element of SLN I am getting compile errors saying-- "0038:5 is not a member of SLN" and
"too many indices to access group 'Temp1'"..
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top