Other checks on purchase requisition state
- fo_releasable->is_rejection_allowed( )
- fo_releasable->is_release_allowed( )
- fo_releasable->is_reset_rel_allowed( )
I_BANFN TYPE EBAN-BANFN ->Purchase Requisition Number
E_RESETABLE TYPE FLAG -> If rejection can be reset this parameter will be set to 'X'
CO_FACTORY TYPE REF TO IF_PURCHASE_REQ_FACTORY -> Purchase requisition factory
HEADER_COULDNT_BE_CREATED
function z_ab_prep_val_for_case_search.
*"--------------------------------------------------------------------
*"*"Local Interface:
*" IMPORTING
*" VALUE(I_TEXT) TYPE CSEQUENCE
*" VALUE(I_SIGN) TYPE CHAR1
*" VALUE(I_OPTION) TYPE CHAR2
*" EXPORTING
*" REFERENCE(ER_RANGE) TYPE STANDARD TABLE
*"--------------------------------------------------------------------
field-symbols: <low> type any.
field-symbols: <sign> type any.
field-symbols: <opt> type any.
field-symbols: <line> type any.
field-symbols: <linenew> type any.
field-symbols: <lownew> type any.
field-symbols: <tab> type standard table.
data: f_times type i.
data: f_text type string.
data: f_textnew type string.
data: f_insidel type i.
data: f_insidel2 type i.
data: ft_data type ref to data.
"create temp table and assign it to FS
create data ft_data like er_range.
assign ft_data->* to <tab>.
f_text = i_text.
"get lenght
f_times = strlen( f_text ).
"translate to upper case so we have always same start
translate f_text to upper case.
"append initial line to range and put first value into table
append initial line to er_range assigning <line>.
check sy-subrc eq 0.
assign component 'LOW' of structure <line> to <low>.
check sy-subrc eq 0.
<low> = i_text. "all in uppercase
assign component 'SIGN' of structure <line> to <sign>.
check sy-subrc eq 0.
<sign> = i_sign.
assign component 'OPTION' of structure <line> to <opt>.
check sy-subrc eq 0.
<opt> = i_option.
translate <low> to upper case.
"create entries for each other combination of cases
do f_times times.
f_insidel2 = sy-index - 1.
loop at er_range assigning <line>.
assign component 'LOW' of structure <line> to <low>.
check sy-subrc eq 0.
if f_text+f_insidel2(1) ca '*+' and ( i_option eq 'CP' or i_option eq 'NP' ).
else.
append initial line to <tab> assigning <linenew>.
check sy-subrc eq 0.
assign component 'LOW' of structure <linenew> to <lownew>.
check sy-subrc eq 0.
assign component 'SIGN' of structure <linenew> to <sign>.
check sy-subrc eq 0.
<sign> = i_sign.
assign component 'OPTION' of structure <linenew> to <opt>.
check sy-subrc eq 0.
<opt> = i_option.
<lownew> = <low>.
f_textnew = <lownew>+f_insidel2(1).
translate f_textnew to lower case.
<lownew>+f_insidel2(1) = f_textnew.
endif.
endloop.
append lines of <tab> to er_range.
refresh <tab>[].
enddo.
endfunction.
I_DATA TYPE DATA OPTIONAL
value( I_CHANGE_NUMBER ) TYPE BAPI1003_KEY-CHANGENUMBER OPTIONAL -> Change Number
NO_DATA
I_DATA TYPE REF TO DATA
CT_OBJVALUESNUM TYPE TT_BAPI1003_ALLOC_VALUES_NUM
CT_OBJVALUESCHAR TYPE TT_BAPI1003_ALLOC_VALUES_CHAR
CT_OBJVALUESCURR TYPE TT_BAPI1003_ALLOC_VALUES_CURR
NO_DATA_TO_PASS
Add a commentIT_VALUES TYPE TT_API_VALI -> screen values table
I_ATNAM TYPE API_VALI-ATNAM -> Characteristic Name
C_DATA TYPE REF TO DATA
NO_DATA_TO_CHANGE
Add a commentI_ATNAMTYPE API_VALI-ATNAM ->Characteristic Name
I_DATATYPE REF TO DATA-> our reference data
CT_VALUES TYPE TT_API_VALI-> Structure for characteristic screen
NO_DATA_TO_CHANGE
Add a commentIT_API_CHAR TYPE TT_API_CHAR -> Table type for structure api_char_tab
Add a comment