01-11-2014 1:22 PM
I wanna hide zeros in select-options values.
eg.
select-options value is 00000338
but i wanna display it without zeros.
Users enter just 338 but i will use it with zeros in my query. How can i do it?
01-11-2014 1:32 PM
Hi
If you area declaring using proper type it will automatically add zero's in backend. I just created select option for MARA-MATNR on screen you see 123 but in debugging it will add leading zero's because of its domain conversion exits. Please use correct field and table reference
Nabheet
01-11-2014 1:32 PM
Hi
If you area declaring using proper type it will automatically add zero's in backend. I just created select option for MARA-MATNR on screen you see 123 but in debugging it will add leading zero's because of its domain conversion exits. Please use correct field and table reference
Nabheet
01-11-2014 2:08 PM
AT SELECTION-SCREEN ON VALUE-REQUEST FOR s_bpid-low.
SELECT DISTINCT bpid FROM /atom/pj50 INTO TABLE gt_itab.
"i deleted zeros in select-options values
LOOP AT gt_itab.
CALL FUNCTION 'CONVERSION_EXIT_ALPHA_OUTPUT'
EXPORTING
input = gt_itab-bpid
IMPORTING
OUTPUT = gt_itab-bpid
.
MODIFY gt_itab.
ENDLOOP.
"f4 help function
IF sy-subrc = 0.
CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST'
EXPORTING
retfield = 'BPID'
dynpprog = sy-repid
dynpnr = sy-dynnr "Aktif pencere
dynprofield = 'S_BPID-LOW'
value_org = 'S' "Mandatory
TABLES
value_tab = gt_itab
* FIELD_TAB =
* RETURN_TAB =
EXCEPTIONS
parameter_error = 1
no_values_found = 2
OTHERS = 3.
IF sy-subrc <> 0.
MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
ENDIF.
ENDIF.
When users write a value without zeros and dont use f4 window in select-options.
must i use pack or overlay to do it.
I am using correct field. i hope you understood me.
01-11-2014 2:27 PM
1.) If you are displaying all the values of table /atom/pj50 in F4 help for S_BPID then you can achieve this like:
SELECT-OPTIONS: s_bpid FOR /atom/pj50-bpid.
2.) Then use pack or overlay if require.
Cheers,
Prakash
01-11-2014 2:36 PM
I think if user enter 313 etc on select option in debugging it will automatically add leading zeros if domain has a conversion routine
01-11-2014 2:50 PM
This table is test table so that domain have no conversion. Thanks for your answers.
01-11-2014 3:57 PM
Then incase your table store it with leading zeros you should use conversion_Exit_alpha_input for the same..it does not work...? Please attach screen shot of table data in both detailed view for one line and one view for all lines
01-11-2014 8:56 PM
I solved problem.
bpid and pernr datas are same but length is diffirent. I just change it. every pernr is 8 character but bpid's length is 12 character i changed it on below code.
data : lv_pernr like pa0001-pernr.
LOOP AT s_bpid.
lv_pernr = s_bpid-low.
s_bpid-low = lv_pernr.
modify s_bpid index sy-tabix transporting low.
ENDLOOP.
Thanks nabheet madan.
01-11-2014 2:46 PM
Hi Kaya,
Currently I am not infront of SAP system but please check if BPID domain have conversion routine it will take leading zero , no need to do any code for that.
Cheers,
Prakash
01-11-2014 2:53 PM