Typical X12/EDIFACT/SAP IDoc mapping: Delivery Terms

Delivery Terms – FOB in X12, TOD + LOC(s) in EDIFACT and E1EDK17 in ORDERS05 IDoc

Examples:
X12:

FOB*PP****EXW*DL*DELIVERY LOCATION NAME~

EDIFACT:

TOD+++EXW'
LOC+1+DELIVERY LOCATION NAME'
LOC+28+NL'

SAP IDoc:

<E1EDP17 SEGMENT="1">
	<QUALF>001</QUALF>
	<LKOND>EXW</LKOND>
</E1EDP17>
<E1EDP17 SEGMENT="1">
	<QUALF>002</QUALF>
	<LKTEXT>DELIVERY LOCATION NAME</LKTEXT>
</E1EDP17>
Entity X12 (4010) EDIFACT (D96A) SAP IDoc (ORDERS05)
Delivery Terms FOB group TOD segment E1EDK17 records
  Delivery Terms Code (INCO) FOB-05 (335), Transportation Terms Code TOD-03C01 (4053), Terms of delivery or transport, coded E1EDK17 / LKOND, Delivery condition code. E1EDK17 / QUALF = 001 (Incoterms part 1)
  Location Type FOB-06 (309) Location Qualifier
—-
DL = Delivery Location
LOC-01 (3227), Place/location qualifier
—-
1 = Delivery
28 = Destination Country
  Location FOB-07 (352) Description LOC-02C01 (3225), Place/location identification E1EDK17 / LKTEXT, Delivery condition code. E1EDK17 / QUALF = 002 (Incoterms part 2)

Some INCO Terms:
——————–
CFR = Cost and Freight
CIF = Cost, Insurance, and Freight
CIP = Carriage and Insurance Paid To
COL = Buyer pays
CPT = Carriage Paid To
CPU = Pickup
DAF = Delivered at Frontier
DAP = Delivered at place
DAT = Delivered at Terminal
DDP = Delivered Duty Paid
DDU = Deliver Duty Unpaid
DEQ = Delivered Ex Quay
DES = Delivered Ex Ship
EXW = Ex Works
FAS = Free Alongside Ship
FCA = Free Carrier
FOB = Free on Board
PPA = Seller prepays
PPD = Prepaid and delivered

Gennady Kim

Advertisements

GXS AI: How to debug maps

I believe every GXS AI map developer knows how hard it might be to debug maps. I’m using SEND_SMSG function when I need to debug a piece of code

First of all, I’m using .bat files to run my maps

otrun -at %MAP_NAME%S.att -cs %OT_QUEUEID% -DLOCALE="English_UnitedStates.Latin1@Binary" -DINPUT_FILE=%BASE_PATH%__in.txt -DOUTPUT_FILE=%BASE_PATH%__out.txt -tl 1023 -lg _log.txt -I

this key “-lg _log.txt” tells the translator to use _log.txt for the translation session output. So, every time I’m using SEND_SMSG it writes it’s 1+ params into _log.txt. For example:

...
SEND_SMSG(1, STRCAT("GID_21_BALQTE_BSD_02_02_2002: ", VAR->GID_21_BALQTE_BSD_02_02_2002_T))
...

And in _log.txt:

Session [003407] Started: at: Sat Jul 25 09:03:04 2012
--GID_21_BALQTE_BSD_02_02_2002: AAA
--GID_21_BALQTE_BSD_02_02_2002: BBB
Session [003407] ended: err: 0 at: Sat Jul 25 09:03:04 2012

…As always, just an idea 🙂

Gennady Kim

Notepad++ and GXS AI models

As you probably know, often GXS AI developer use 3rd party editors when working with the models (instead of Workbench). My colleagues use Notepad++ with a “plugin” (User Defined Language) developed by Igor Nechaev:

notepad plus gxs ai

it highlights used constructions, allows to to collapse/expand blocks of code, helps you to comment/uncomment blocks of code and so on.

Here is the code of this “plugin” (User Defined Language):
Continue reading

Typical X12/EDIFACT/SAP IDoc mapping: Date/Time

Free-Form Text – DTM in X12, DTM in EDIFACT and E1EDK03 (or E1EDP03) in ORDERS05 IDoc

Examples:
X12:

DTM*002*20141210~

EDIFACT:

DTM+2:20141210220000:204'

SAP IDoc:

<E1EDK03 SEGMENT="1">
	<IDDAT>002</IDDAT>
	<DATUM>20141210</DATUM>
	<UZEIT>220000</UZEIT>
</E1EDK03>
Entity X12 (4010) EDIFACT (D96A) SAP IDoc (ORDERS05)
Date/Time DTM segment DTM segment E1EDK03 record
  Type DTM-01 (374), Date/Time qualifier DTM-01C01 (2005), Date/time/period qualifier E1EDK03 / IDDAT, Qualifier for IDOC date segment
  Date DTM-02 (373), Date DTM-01C02 (2380), Date/time/period. Both date and time might be included into this sub-element. The format depends on DTM-01C03 (2379) E1EDK03 / DATUM, Date
  Time DTM-03 (337), Time DTM-01C02 (2380), Date/time/period. Both date and time might be included into this sub-element. The format depends on DTM-01C03 (2379) E1EDK03 / UZEIT, Time

Gennady Kim

Typical X12/EDIFACT/SAP IDoc mapping: Free-Form Text

Free-Form Text – N9+MSG in X12, FTX in EDIFACT and E1EDKT1+E1EDKT2 (or E1EDPT1+E1EDPT2) in ORDERS05 IDoc

Examples:
X12:

N9*ZZ*Header Text~
MSG*TEXT LINE1~
MSG*TEXT LINE2~
MSG*TEXT LINE3~
MSG*TEXT LINE4~

EDIFACT:

FTX+ZZZ+++TEXT LINE1:TEXT LINE2:TEXT LINE3:TEXT LINE4:TEXT LINE5'

SAP IDoc:

<E1EDKT1 SEGMENT="1">
	<TDID>001</TDID>
	<E1EDKT2 SEGMENT="1">
		<TDLINE>TEXT LINE1</TDLINE>
	</E1EDKT2>
	<E1EDKT2 SEGMENT="1">
		<TDLINE>TEXT LINE2</TDLINE>
	</E1EDKT2>
	<E1EDKT2 SEGMENT="1">
		<TDLINE>TEXT LINE3</TDLINE>
	</E1EDKT2>
	<E1EDKT2 SEGMENT="1">
		<TDLINE>TEXT LINE4</TDLINE>
	</E1EDKT2>
	<E1EDKT2 SEGMENT="1">
		<TDLINE>TEXT LINE5</TDLINE>
	</E1EDKT2>
</E1EDKT1>
Entity X12 (4010) EDIFACT (D96A) SAP IDoc (ORDERS05)
Free-Form Text N9 group FTX segment E1EDKT1+E1EDKT2 records
  Type N9-01 (128), Reference Ident Qual FTX-01 (4451), Text subj qualifier E1EDKT1 / TDID, Text ID
  Text MSG-01 (933), Free-form Message Text FTX-04C01, 04C02, 04C03, 04C04 and 04C01 (C108 / 4440), Free Text E1EDKT2 / TDLINE, Text line

Gennady Kim

Typical X12/EDIFACT/SAP IDoc mapping: Reference Information

Reference Information – REF in X12, RFF (+DTM) in EDIFACT and E1EDK02 in ORDERS05 IDoc

Entity X12 (4010) EDIFACT (D96A) SAP IDoc (ORDERS05)
Reference Information REF segment RFF group E1EDK02 record
  Type REF-01 (128), Reference Ident Qual RFF-01C01 (C506 / 1153), Reference qualifier E1EDK02 / QUALF, IDOC qualifier reference document
  Reference value REF-02 (127), Reference Ident RFF-01C02 (C506 / 1154), Reference number E1EDK02 / BELNR, IDOC document number
  Item Number RFF-01C03 (C506 / 1156), Line number E1EDK02 / POSNR, Item number
  Reference Date DTM segment in RFF group E1EDK02 / DATUM, IDOC: Date
E1EDK02 / UZEIT, IDOC: Time

Gennady Kim