2010 Jan 18 11:25 AM
Hi everyone,
I am using the FM POPUP_GET_VALUES, so the user can insert the company code. I would like that the FM validate if the company code really exists.
I am using this code:
field-tabname = 'T001'.
field-fieldname = 'BUKRS'.
dield-field_obl = 'X'.
APPEND field.
CALL FUNCTION 'POPUP_GET_VALUES'
EXPORTING
no_value_check = 'X'
popup_title = w_title
IMPORTING
returncode = w_retn
tables
fields = field
I do not really get, the use of the import parameter, no_value_check because no matter the vallue it has it will not validate de company code I use.
Is there any way to validate the parameters I use in this FM?
Thanks in advance.
2010 Jan 18 11:38 AM
hi,
use POPUP_GET_VALUES_DB_CHECKED
POPUP_GET_VALUES_USER_CHECKED
POPUP_GET_VALUES_USER_HELP
you can check this link
http://help.sap.com/saphelp_nw04/helpdata/en/2a/f9fff0493111d182b70000e829fbfe/frameset.htm
thanks
2010 Jan 18 11:30 AM
Hi,
You can validate the company code after the exceution of the FM.
You cannot validate in the FM.
Regards,
Daz.
2010 Jan 18 11:38 AM
hi,
use POPUP_GET_VALUES_DB_CHECKED
POPUP_GET_VALUES_USER_CHECKED
POPUP_GET_VALUES_USER_HELP
you can check this link
http://help.sap.com/saphelp_nw04/helpdata/en/2a/f9fff0493111d182b70000e829fbfe/frameset.htm
thanks
2010 Jan 18 11:42 AM
data:lv_code type BAPI0002_2-COMP_CODE.
CALL FUNCTION 'POPUP_GET_VALUES'
EXPORTING
no_value_check = 'X'
popup_title = w_title
IMPORTING
returncode = w_retn
tables
fields = field.
if sy-ucomm = 'FURT'.
read table field index 1.
if sy-subrc = 0.
lv_code = field-value.
here use fm BAPI_COMPANYCODE_EXISTENCECHK pass lv_code and check whether the company code exists
endif.
endif.
2010 Jan 18 11:50 AM
I would like to thanks to everyone who responded.
I used the FM POPUP_GET_VALUES_DB_CHECKED and it worked just fine.
thanks