2008 Mar 10 2:14 PM
I'm using field symbols to enter the values I need to validate in transaction FBCJ, th reference field.
For some reason all the validations I try with '(SAPMFCJ0)itcj_e_postings-tax_code' are not working. It treats them as if the were
I can't find a way to place a break-point in the exits, but when I pass that field symbols to the output export, the Reference field gets filled with the transaction, so I suppose the validations should work
Here is the troubling code
data: i_nd(2) value 'ND',
i_na(2) value 'NA',
i_value(2).
DATA: l_tex1(25) value '(SAPMFCJ0)iscj_e_postings',
l_tex2(18) value '(SAPMFCJ0)sy-ucomm',
l_tex3(35) value '(SAPMFCJ0)itcj_e_postings-tax_code',
l_x(3).
FIELD-SYMBOLS: <fest> TYPE iscj_postings,
<fokc> TYPE sy-ucomm,
<fes2> TYPE iscj_postings-tax_code.
ASSIGN (l_tex2) to <fokc>.
if sy-subrc EQ 0.
l_x = 'X'.
endif.
ASSIGN (l_tex1) to <fest>.
if sy-subrc EQ 0.
l_x+1 = 'X'.
endif.
ASSIGN (l_tex3) to <fes2>.
if sy-subrc EQ 0.
l_x+2 = 'X'.
endif.
move <fes2> to i_value.
if NOT <fest>-transact_name IS INITIAL AND i_value NE i_nd AND i_value
NE i_na.
CALL METHOD checa_rfcok
EXPORTING
i_est = <fest>.
endif.
I'm using field symbols to enter the values I need to validate in transaction FBCJ, th reference field.
For some reason all the validations I try with '(SAPMFCJ0)itcj_e_postings-tax_code' are not working. It treats them as if the were
I can't find a way to place a break-point in the exits, but when I pass that field symbols to the output export, the Reference field gets filled with the transaction, so I suppose the validations should work
Here is the troubling code
data: i_nd(2) value 'ND',
i_na(2) value 'NA',
i_value(2).
DATA: l_tex1(25) value '(SAPMFCJ0)iscj_e_postings',
l_tex2(18) value '(SAPMFCJ0)sy-ucomm',
l_tex3(35) value '(SAPMFCJ0)itcj_e_postings-tax_code',
l_x(3).
FIELD-SYMBOLS: <fest> TYPE iscj_postings,
<fokc> TYPE sy-ucomm,
<fes2> TYPE iscj_postings-tax_code.
ASSIGN (l_tex2) to <fokc>.
if sy-subrc EQ 0.
l_x = 'X'.
endif.
ASSIGN (l_tex1) to <fest>.
if sy-subrc EQ 0.
l_x+1 = 'X'.
endif.
ASSIGN (l_tex3) to <fes2>.
if sy-subrc EQ 0.
l_x+2 = 'X'.
endif.
move <fes2> to i_value.
if NOT <fest>-transact_name IS INITIAL AND i_value NE i_nd AND i_value
NE i_na.
CALL METHOD checa_rfcok
EXPORTING
i_est = <fest>.
endif.
2008 Mar 10 6:00 PM
It appears that the field exit enters several times, that's why the output did show the tax code
Solved this using all the conditions in structure (SAPMFCJ0)itcj_e_postings because it has all the values I need to validate