Parse Customer Item Number of Supplier Item Number Using X4101 (VerifyAndGetItemMaster)

Goal

The purpose of this document is to guide how to parse Customer Item Number or Supplier Item Number (F4101.CITM) into Company Item Number (F4101.LITM) using the business function VerifyAndGetItemMaster (X4101, F4101 Get Item Master Row). For detail usage, refer to <Document 2378772.1> - E1: 42: How to Filter Sales Order Detail Lines Using Customer Item Number (CITM) in Customer Service Inqury (F4211E) Delete Reference

Prerequisite:

1. Set Symbol Customer/Supplier (F41001.SYM5) for the branch/plant 'M30' (F41001.MCU)
2. Add Cross Reference for the customer 74242 using P4104 (Cross Reference) as below,
  - Cross-Reference Code Type = 'C' (F4104.XRT)
  - Cross Reference Item Number = 'COFFEE' (F4104.CITM)
  - Address Number = 74242 (F4104.AN8)
  - Eff Date = Today's date
  - Expired Date = 12/31/Default Value of DD Alias DCYR (or CENTCHG)
3. Set the processing option of P4210|Version as below,
  - (Tab) 12-Order Inquiry
  - 7. Customer Cross Reference Type = 'C'
 

Solution

Business Function: VerifyAndGetItemMaster (X4101, F4101 Get Item Master Row)

Parameter Name Data Item Data Type Req/Opt I/O/Both Detail
szPrimaryItemNumber UITM char OPT IN

Enter Customer Item Number, or Supplier Item Number

szBranchPlant MCU char OPT IN Detail Branch/plant to reads symbol from F41001
szDescription DSC1 char OPT NONE  
szDescription2 DSC2 char OPT NONE  
cSymbolidentifier SYMID char OPT IN  Blank. Do not specify it to read symbols from Item Branch Constant File.
idF4101LongRowPtr GENLNG ID OPT NONE  Do not get this value. Refer to cReturnPtr
mnShortItemNumber ITM MATH_NUMERIC OPT OUT  To get F4101.ITM based on customer/supplier Item Number
cErrorcode ERRC char OPT NONE  In case you want to handle error, get return value of this. This parameter is dependent on cSuppressErrorMsg below.
szLanguagepreference LNGP char OPT NONE  In case you want to read F4101D.DSC1, and DSC2 for your language (SL Langauge) map it.
mnAddressnumber AN8 MATH_NUMERIC OPT IN Assign customer or supplier number to read F4104
szSystemcode SY char OPT NONE  
szLongItemNumber LITM char OPT NONE  
szThirdItemNumber AITM char OPT NONE  
szItemFlashMsg IFLA char OPT NONE  
cReturnPtr EV01 char OPT IN  Hard code '0' not to return pointer of F4101. Make it sure remove pointer in case you set '1' to return it.
cSuppressErrorMsg EV02 char OPT IN  Hard code '1' not to handle error. In case you want to resolve the error and its code, set it '0' not to suppress error (this will stop processing)
szErrorMsgID DTAI char OPT NONE  This returns error code if you set cSuppressErrorMsg = 0 above.
cCallType EV01 char OPT IN  Set '1' to get customer or supplier item number
idPtrToF41001Record GENLNG ID OPT NONE  In case you have the F41001 data pointer at hand you can map it not to read F41001. Do not map to read the cache of F41001.
szBaseLngDesc1 DSC1 char OPT NONE  
szBaseLngDesc2 DSC2 char OPT NONE  
cCrossRefMode MODE char OPT IN  Set '1' for customer and '2' for supplier. For instance, actual value will be represented as 'C - Customer Part Number', or 'VN - Vendor Part Number).
cLngPrefType EV01 char OPT NONE  
jdExpirationDate EXDJ JDEDATE OPT IN  Set as-of date (system date, order date and so on) because customer may change the item number along the way.
szStandardUOMConversion TFLA char OPT NONE  
szTemplate TMPL char OPT NONE  
szSegment1 SEG1 char OPT NONE  
szSegment2 SEG2 char OPT NONE  
szSegment3 SEG3 char OPT NONE  
szSegment4 SEG4 char OPT NONE  
szSegment5 SEG5 char OPT NONE  
szSegment6 SEG6 char OPT NONE  
szSegment7 SEG7 char OPT NONE  
szSegment8 SEG8 char OPT NONE  
szSegment9 SEG9 char OPT NONE  
szSegment10 SEG0 char OPT NONE  
cMatrixControlled MIC char OPT NONE  
cPMPNEnabledYN PNYN char OPT NONE  

Note that X4101 can be used for other purpose. Above mapping is minimum input values to return customer item number or supplier item number (F4104.CITM) using symbol (F41001.SYM5), F4104.AN8 (Customer/Supplier Number), and date.

Query example when,

Sql> SELECT IVAN8, IVXRT, IVITM, IVEXDJ, IVEFTJ, IVCITM, IVDSC1, IVDSC2 FROM PRODDTA.F4104 WHERE ( IVCITM = 'COFFEE' AND IVXRT = 'C ' AND IVAN8 = 74242.000000 ) AND ( IVEXDJ >= 118085 AND IVEFTJ <= 118085 ) ORDER BY IVCITM ASC,IVXRT ASC,IVAN8 ASC