SALopez
Member
I'm well aware that the RORN number in F4311 (and F4801) are character based. I'm trying to convert the SO number in F4211 to a character and left pad with zeros so I can read through both the PO detail and WO header files to find orders that point back to open sales order lines.
I can left pad with character values, but I can't get my field to left pad with a character representation of zero.
My code is as follows:
Convert Math_Numeric To String
VA rpt_DerivedSoNumber=lpad([VA_rpt_DerivedUnPaddedSoNumber],"0",8)
RV TEST = VA rpt_DerivedSoNumber
F4311.Fetch Single
The Convert Math function is B8000094, with BC Document (Order No, Invoice, etc.) (F4211)(DOCO) being fed into the MathNumeric field and VA rpt_DerivedUnPaddedSoNumber receiving the output. This appears to work and show correctly when I point RV TEST to it.
The rpt_DerivedSoNumber number, however, remains unpadded when I use a zero in lpad. It will fill correctly if I use a character (h,H, etc). Both of the derived fields are 8 character variables built on RORN as the DD item.
What am I missing here? I know this is commonly done, but can't find any code samples either on line or in our system to see what other approach I can take.
We're on E1 9.0.1 and tools release 8.98.3.3.
I can left pad with character values, but I can't get my field to left pad with a character representation of zero.
My code is as follows:
Convert Math_Numeric To String
VA rpt_DerivedSoNumber=lpad([VA_rpt_DerivedUnPaddedSoNumber],"0",8)
RV TEST = VA rpt_DerivedSoNumber
F4311.Fetch Single
The Convert Math function is B8000094, with BC Document (Order No, Invoice, etc.) (F4211)(DOCO) being fed into the MathNumeric field and VA rpt_DerivedUnPaddedSoNumber receiving the output. This appears to work and show correctly when I point RV TEST to it.
The rpt_DerivedSoNumber number, however, remains unpadded when I use a zero in lpad. It will fill correctly if I use a character (h,H, etc). Both of the derived fields are 8 character variables built on RORN as the DD item.
What am I missing here? I know this is commonly done, but can't find any code samples either on line or in our system to see what other approach I can take.
We're on E1 9.0.1 and tools release 8.98.3.3.