Hello,
I've got a problem that I haven't seen anywhere on this forum. The Main window of our custom payment advice form is being called from driver program RFFOUS_T. We are occasionally seeing that the line item element is being called by the program and is being skipped over. I have watched in the sapscript debugger and can see that flow control goes to the first line, /E 625, and then immediately returns to the calling program without stepping into the element logic. What's supremely baffling, it sometimes will step into the logic, and I can see no indication of why it sometimes does and sometimes doesn't. In the test data I was given, the first line steps into the element and works fine and the second one does not. I've check the return code from the driver program's call to function 'WRITE_FORM', and it is 0 in both cases.
Here is the code in the driver:
CALL FUNCTION 'WRITE_FORM'
EXPORTING
element = '625'
function = 'APPEND'
EXCEPTIONS
window = 1
element = 2.
Here is the line item element in the main window:
/E 625
/* -
Line items -
/: PROTECT
T1 ,,®UP-XBLNR&,,®UP-BLDAT&,,®UP-BELNR&
= ,,®UD-WRBTR(13)&
= ,,®UD-WABZG(12)&,,®UD-WNETT(13)&
/* Change description based on first character of vendor field
/: IF ®UH-LIFNR(1)& = '9'
ZE ,,<I>®UP-SGTXT&</>
/: ELSE
/: PERFORM GET_SGTXT IN PROGRAM ZFI_CHECK_FOR_USA_FORM
/: USING ®UP-BUKRS&
/: USING ®UP-BELNR&
/: USING ®UP-GJAHR&
/: USING ®UP-BUZEI&
/: CHANGING &V_SGTXT&
/: ENDPERFORM.
ZE ,,<I>&V_SGTXT&</>
/: ENDPROTECT
Is there any reason any of you can think of why this would happen? I will explore all ideas.
Thanks,
Nathan Beeler