How To Debug Error in Running R47071

Purpose of Document

The purpose of this document is to list up possible error you can face in running R47071 (EDI Receiving Advice Edit/Create - Purchasing). This document gives you some case study but this does not encompass all possible errors in performing Purchase Order Receipt routine.

It is important to understand below,

Possible errors in R47071

: There are two different levels of errors one is issued by system function and the other one is issued by business function.

Error issued by event rules:-

Error Description Issued by Possible Cause How to Resolve error
0965 Order on Hold
CAUSE . . . . The order/line you are trying to select is on hold.
RESOLUTION. . Retry the command again when not on hold.
Set UBE Error F4301.HOLD for associated purchase order is not Blank Release held order and try it again.
143J Item number not on purchase order
CAUSE . . . . The item number does not exist on the referenced purchase order.
RESOLUTION. . The item number in the EDI record must match the corresponding field on the purchase order.
Set UBE Error Both F47072.LNID and F47072.LITM are specified but the F47072.LITM <> F4311.LITM for associated PO Either do not specify F47072.LITM or set same item number for refrenced line.
143Q LineItemStatusCodeBlank
CAUSE . . . . LineItemStatusCode is blank.
RESOLUTION. . Enter a Valid LineItemStatus Code.
Set UBE Error F47072.LSTS is not specified Specify L47072.LSTS. This column value functions like MATC in PO receipt through P4312. Refer LSTS below,
4723 Quantity Restriction Exceeded for Item
CAUSE . . . . This item contains a quantity restriction for the Serial Number.
The quantity cannot exceed one (1) primary unit of measure.
This quantity restriction is being enforced due to the LSN
process type (SRCE) in the Item Branch Master.
RESOLUTION. . If this serial number already exists with a quantity, then you
may not add any more quantity to this serial number. If this
serial number does not exist or exists with no quantity, then
you may add a quantity of one primary unit of measure. If this
item should not be serial number processed, then you can
change the LSN process type (SRCE) in the Item Branch Master.
**NOTE: You will receive this error if you are attempting to do
a transfer (From: Item and Lot matches To: Item and Lot) for a
serial number item in the Reclassifications program. You must
use the Transfers program (P4113) for serial number transfers.
Set UBE Error F4101.SRCE is 5, 6, 7 and F47072.UREC is 1 or -1
Or, F4101.SRCE = 4 and F47072.LOTN is not blank and F47072.UREC is 1 or -1.
Refer SRCE below,
43A10 Action invalid
CAUSE: The line being received has no unit or amount to receive.
RESOLUTION: Receive a line which has units or amount open which can be received.
Set UBE Error Either F4311.UOPN or AOPN is zero. This routine is same with P4312 which does not allow you to perform PO receipt. So you do not have anything to receive.
This is generic error in running R47071. Meaning that you will hit this error in work center so long as it fails any validation.
861E Purchase Order Line Closed
CAUSE .... The purchase order line is closed and can not be received via this Transaction
RESOLUTION.. The transaction must be processed against an open Purchase Order Line
Set UBE Error When F4311.NXTR = '999' Same with above. Purchase Order is closed.

Note that this document shall not cover coding level error because the purpose of this document is to guide how to debug in hitting a certain error. Some of possible error can be found as below,

LSTS (Line Item Status Code)

Code specifying the action taken by the seller on a line item requested by the buyer. Used in EDI PO Acknowledgement, Shipping Notice, Receiving Advice, and PO Change Acknowledgement. Refer to ANSI X.12 Data Item 668.
The first character of the second description indicates to the program what action to take concerning the processing of the line.
1 Process the line
7 Process the line and close the remaining amount
9 Cancel the line
I Informational only, print on audit report only
If this field is left blank, a 1 will be defaulted to process the line.

cf., UDC 43/PR - REceiving Options for PO Line with values below,
Code Description
.
1 Receive Purchase Order Line
4 Receive Into Multiple Location
5 Continuous Over Receipt
7 Receive and Close Purchase Ord
9 Cancel Purchase Order Line

SRCE (Layer Code - Source)

A code that indicates whether lot or serial number is assigned. Lot and serial number processes use the Lot Master table (F4108).
Valid codes are:
0 Lot assignment is optional. You can manually assign numbers. Quantity can be greater than one. (Default)
1 Lot assignment is required. The system assigns numbers using the system date in YYMMDD format. Quantity can be greater than one.
2 Lot assignment is required. The system assigns numbers in ascending order using Next Numbers. Quantity can be greater than one.
3 Lot assignment is required. You must manually assign numbers. Quantity can be greater than one.
4 Serial number assignment is optional except during shipment confirmation. Quantity must not exceed one.
5 Serial number assignment is required. The system assigns numbers using the system date in YYMMDD format. Quantity must not exceed one.
6 Serial number assignment is required. The system assigns numbers in ascending order using Next Numbers. Quantity must not exceed one.
7 Serial number assignment is required. You must manually assign numbers. Quantity must not exceed one.

Error issued by business functions called:-

Note that most of error and work center message may not give you exact resolution. So it is important for you to analyze UBE log (refer to <Document 1542863.1> - E1: How to Turn on Logging for UBE submitted on Enterprise server from fat/web client In EnterpriseOne ).

Error Description Issued by Possible Cause How to Resolve error
0949 Currency Exchange Rate Not Found
CAUSE . . . . A valid rate for this currency code could not be found in the Currency Exchange Rates file (F0015), and no manual rate was entered.
RESOLUTION. . Add the exchange rate for the currency code in the Currency Exchange Rate file (F0015), or if the screen has an Exchange Rate field, you may enter an Override Exchange Rate manually.
GetExchRate (B0000033, F0015 Get Exchange Rate) The cause of this error is coming when it gets based currency and transaction currency. Commonly it is caused by missing value from F47072.AN8. Specify value F47072.AN8 based on F4311.AN8 for matching line.

Refer case study section below,
3143 File can not be accessed.
CAUSE . . . . ERROR: File can not be accessed.
Solution. . . Change IBM security or authority using the IBM EDTOBJAUT command.
This file can not be accessed with the current IBM authority for the User executing this request.
GetReleasePODetailInformation (B4300240, F4311 Get Item, Account, Subledger) The error is coming when it fails to get Purchase Order detail file owing to missing primary key for the same. Commonly it is related with F47072.SFXO Set F47072.SFXO = F4311.SFXO
4150 Invalid Line Type
CAUSE . . . . The line type entered does not exist in the Line Type Constants File (F40205).
RESOLUTION. . Enter a valid line type or press F1 for Help.
GetLineTypeConstants (B4000260, F40205 Get Line Type Constants) F40205 does not have Blank Line Type Specify F47072.LNTY because you shall not have blank line type from F40205.
0003 Blanks Invalid
CAUSE . . . . The data field being processed does not allow blanks or zeros to be entered.
RESOLUTION. . Enter a non-blank or non-zero value.
Multiple business functions Commonly this is caused by other error superceeds this error. This is because some of routine may not stop R47071 from processing though it hits a certain error. Try to fix/correct error in sequence.

Note that this document shall not cover coding level error because the purpose of this document is to guide how to debug in hitting a certain error. Some of possible error can be found as below,

Case Study 1

In running R47071 with below data, user are getting work center error message as below,


A. Data

Order Co (KCOO) Order Number (DOCO) Or Ty (DCTO) Ord Suf (SFXO) Address Number (AN8)
00001 9999 OP 0 4242

Order Co (KCOO) Order Number (DOCO) Or Ty (DCTO) Ord Suf (SFXO) Line Number (LNID) Address Number (AN8) Ln Ty (LNTY)
00001 9999 OP 0 1.000 0

B. Errors in Work Center

Values in table F01131M (JDEM Multi Level Message)

Parent Serial Number (PSRK) Serial Number (SERK) Brief Message (MSGP) Tickler Date (DTI) Level (LV) Address No (AN8) Parent Address (PA8) Template Value (TSV) Template ID (TMPI) Form ID (FRMI) Application ID (EAP) Version (VERS) Function Name (FCTNM) Line Number (LNBR) Form Name (FMNM) Parent Key Ser No (PPSRK)
4233426 4233427 1/15/2016 3 59723 59723 1 LM0020 0 999999
4233427 4233428 Error: Currency Exchange Rate Not Found 1/15/2016 4 59723 59723 0949 0 GetExchRate 163 999999
4233427 4233429 Error: File can not be accessed. 1/15/2016 4 59723 59723 3143 0 GetReleasePODetailInformation 109 999999
4233427 4233430 Error: Invalid Line Type 1/15/2016 4 59723 59723 4150 0 GetLineTypeConstants 576 999999
4233427 4233431 Error: Blanks Invalid 1/15/2016 4 59723 59723 0003 0 GetItemUoMConversionFactor 647 999999
4233427 4233432 Error: Action invalid 1/15/2016 4 59723 59723 43A10 0 Set UBE Error 478 999999
4233425 4233426 1/15/2016 2 59723 59723 1 LM0019 0 999999

Descriptive message in work center

Subject : Error: Currency Exchange Rate Not Found
CAUSE . . . . A valid rate for this currency code could not be found in the
Currency Exchange Rates file (F0015), and no manual rate was
entered.
RESOLUTION. . Add the exchange rate for the currency code in the Currency
Exchange Rate file (F0015), or if the screen has an Exchange
Rate field, you may enter an Override Exchange Rate manually.

Subject : Error: File can not be accessed.
CAUSE . . . . ERROR: File can not be accessed.
Solution. . . Change IBM security or authority using the IBM EDTOBJAUT command.
This file can not be accessed with the current IBM authority
for the User executing this request.

Subject : Error: Invalid Line Type
CAUSE . . . . The line type entered does not exist in the Line Type Constants
File (F40205).
RESOLUTION. . Enter a valid line type or press F1 for Help.

Subject : Error: Blanks Invalid
CAUSE . . . . The data field being processed does not allow blanks or zeros
to be entered.
RESOLUTION. . Enter a non-blank or non-zero value.

Subject : Error: Action invalid
CAUSE: The line being received has no unit or amount to receive.
RESOLUTION: Receive a line which has units or amount open which can be received.


How to debug Error: Currency Exchange Rate Not Found :


1. Run Performance Workbench with key words like (Edit Debug String in PW.exe)
INSERT INTO CRPDTA.F01131M
JDEERR
CRPDTA.F4
: which returns any string contains above key words into <R47071_VersionName_JobNumber_PDF_CALLSTACK5.txt>

2. Focus on error,
1. ENTER: GetExchRate
ERROR INFO JDEERR - ID= 8, Error= 0949 - b0000033.c, Line= 163
1. EXIT: for GetExchRate=2

3. Go to jdedebug.log to determine the cause of error,

Calling Business function GetExchRate from Level 1 for UserID. Application Name [R47071], Version [ZJDE0001] (BSFNLevel = 1) *** BSFNLevel = 1 indicates that this function gets called directly from the application R47071 ***
IN->[ 1] szCurrencyCodeFrom [] *** Note that input szCurrencyCodeFrom is not specified ***
IN->[ 2] szCurrencyCodeTo [USD]
IN->[ 3] mnAddressNumber [0]
IN->[ 4] jdTransactionDate [01/15/16]
...
SELECT * FROM CRPDTA.F0015 WHERE ( CXCRCD = ' ' AND CXCRDC = 'USD' AND CXAN8 = 0.000000 AND CXRTTYP = ' ' ) AND ( CXEFT <= 116007 ) ORDER BY CXCRCD ASC,CXCRDC ASC,CXAN8 ASC,CXRTTYP ASC,CXEFT DESC
No More Data found (hRequest 095f5ce8)
ERROR INFO JDEERR - ID= 8, Error= 0949 - b0000033.c, Line= 163
: So for this example, error is coming because input szCurrencyCode is Blank. So to determine how this value is populated, go to even rule and check it.


3. Event rule of R47071

...
0040 If BC Currency Conversion Rate - Spot Rate (F47072)(CRR) is equal to <Blank> Or <Null> Or <Zero>
0042 F0401.Fetch Single
BC Address Number (F47072)(AN8) = TK Address Number
VA evt_CurrencyCodeFrom_CRCD <- TK Currency Code - Accounts Payable
...
0095 F0015 Get Exchange Rate
VA evt_CurrencyCodeFrom_CRCD -> BF szCurrencyCodeFrom *** Value returned by F0401.CRCD on F0401.AN8 = F47072.AN8 ***
VA evt_CurrencyCodeTo_CRDC -> BF szCurrencyCodeTo
BC Address Number (F47072)(AN8) -> BF mnAddressNumber
VA rpt_GLDate -> BF jdTransactionDate
...
: So for this example, input parameter szCurrencyCodeFrom is the outcome of F0401.Fetch Single. So verify Table I/O through log


4. UBE log

SELECT * FROM CRPDTA.F0401 WHERE ( A6AN8 = 0.000000 )
No More Data found (hRequest 095f25f8) *** No More Data found indicates that above query has failed to return value ***
: Based on above even rule line number 0042, we can determine that input value of F47072.AN8 is zero


So this error can be resolved by setting F47072.AN8 = F4311.AN8 or from given data F47072.AN8 = F47071.AN8


How to debug Error: File can not be accessed.:

1. Run Performance Workbench with key words like (Edit Debug String in PW.exe)
INSERT INTO CRPDTA.F01131M
JDEERR
CRPDTA.F4
: which returns any string contains above key words into <R47071_VersionName_JobNumber_PDF_CALLSTACK5.txt>

2. Focus on error,
1. ENTER: GetReleasePODetailInformation
ERROR INFO JDEERR - ID= 0, Error= 3143 - b4300240.c, Line= 109
1. EXIT: for GetReleasePODetailInformation=2 *** Return value 2 indicates that this function returns ER_ERROR. Refer <Document 1179493.1> - E1: BSFN: Call Object Kernel Errors Clarification - jdeCallObject API and Error message COB0000* ***
: You can get error ID as below,
1. Go to P92002|W92002F - Error Messages [Work With Glossary Items]
2. Search for Error ID by entering Error Description as written in Work Center Message. For instance, "File can not be accessed."
3. Press Find button, which shall return GC Data Item '3143'

3. (Optional) Check error routine through business function referened,

*** Break In Code ***
if (lpDS->idPointerToF4311DS == (ID) NULL )
{
jdeSetGBRError (lpBhvrCom, lpVoid, (ID) 0L, _J("3143"));
return ER_ERROR;
}
*** Break In Code ***
: For this instance, if input parameter idPointerToF4311DS is NULL then the error "3143" is to be issued.



4. Check the event rule to determine how input parameter idPointerToF4311DS is assigned

0079 F4311 Get Purchase Order Detail Row
BC Document (Order No, Invoice, etc.) (F47072)(DOCO) -> BF mnOrderNumber
BC Order Type (F47072)(DCTO) -> BF szOrderType
BC Order Company (Order Number) (F47072)(KCOO) -> BF szDocumentCompany
BC Order Suffix (F47072)(SFXO) -> BF szOrderSuffix
BC Line Number (F47072)(LNID) -> BF mnOrderLineNumber
VA rpt_F4311Pointer_GENLNG <- BF idPointerToF4311DataStructure
"1" -> BF cReturnFlag
"1" -> BF cCallType
"1" -> BF cSuppressErrorMessage
...
0094 F4311 Get Item, Account, Subledger
VA rpt_F4311Pointer_GENLNG -> BF idPointerToF4311DS
...
: So cause of NULL Pointer is returned by F4311 Get Purchase Order Detail Row
To now the function name, commonly,
1. Go to P98652 (Business Function Search)
2. Copy/paste (business function) description at QBE column of Description (e.g., F4311 Get Item, Account, Subledger)
3. Press Find button which returns Function Name "GetReleasePODetailInformation" and Source Module "B4300240"



5. UBE log with parameters,

Calling Business function GetPurchaseOrderDetail from Level 1 for UserID. Application Name [R47071], Version [ZJDE0001] (BSFNLevel = 1)
IN->[ 1] mnOrderNumber [16000560]
IN->[ 2] szOrderType [OP]
IN->[ 3] szDocumentCompany [00001]
IN->[ 4] szOrderSuffix [0 ] ***
IN->[ 5] mnOrderLineNumber [1,000]
IN->[ 6] idPointerToF4311DataStructure [0]
IN->[ 7] cReturnFlag [1]
...
SELECT * FROM CRPDTA.F4311 WHERE ( PDDOCO = 16000560.000000 AND PDDCTO = 'OP' AND PDKCOO = '00001' AND PDSFXO = '0 ' AND PDLNID = 1000.000000 )
No More Data found (hRequest 0963f9c0)
...
OUT->[ 6] idPointerToF4311DataStructure [0]
OUT->[ 7] cReturnFlag [1]
OUT->[ 8] cErrorCode [1]
OUT->[ 9] cCallType [1]
OUT->[ 10] szErrorMessageID [0002]
OUT->[ 11] cSuppressErrorMessage [1]
Return value is 2 for GetPurchaseOrderDetail. (BSFNLevel = 1)
Calling Business function GetReleasePODetailInformation from Level 1 for DBERRA. Application Name [R47071], Version [DA0001] (BSFNLevel = 1)
IN->[ 1] idPointerToF4311DS [0]
...
ERROR INFO JDEERR - ID= 0, Error= 3143 - b4300240.c, Line= 109
...
:


So to fix error, populate F47072.SFXO


Note that the actual cause of error can be vary. Rather information below is to guide you how to debug in your hitting error.