03-24-2005 9:47 AM
hey guys
i have one more question to ask.
i want to check whether the input parameter Business Area value exists in table or not thru FM G_SET_GET_ALL_VALUES
Used code is below.
parameter:p_gsber2 like bseg-gsber obligatory.
I called FM> in AT SELECTION-SCREEN Part,is it correct or not? because i want to display error in same input screen.
could you pls help me
how to use this FM in this case.
if i use FM as below i can get table list containing company code 200 with All Biz Areas.but in which way input parameter links with This FM.
CLIENT
FORMULA_RETRIEVAL
LEVEL 0
SETNR BR_200
VARIABLES_REPLACEMENT
TABLE TGSB
CLASS 0000
NO_RW_INFO
NO_DESCRIPTIONS
ambichan.
Message was edited by: ambi chan
03-24-2005 10:26 AM
Hi,
try at first this:
REPORT zforum12 .
PARAMETERS p_gsber LIKE bseg-gsber.
AT SELECTION-SCREEN ON p_gsber .
SELECT COUNT( * ) FROM tgsb INTO sy-dbcnt
WHERE gsber = p_gsber.
IF sy-dbcnt <> 1.
MESSAGE e000(fb) WITH 'pls enter correct b-aerea!'.
ENDIF.
regards Andreas
03-24-2005 10:02 AM
Hi,
If you just want to check for the existance of business area, you can issue a SELECT on table TGSB against field GSBER. AT-SELECTION-SCREEN is the correct place to write your code.
Regards
03-24-2005 10:05 AM
hey
sorry for my poor explanation.
i have to check whether INPUT GSBER is exist or not using inputted company code and GSBER.
purpose is to check whether gsber exists in company codee 200.
ambichan.
Message was edited by: ambi chan
03-24-2005 10:26 AM
Hi,
try at first this:
REPORT zforum12 .
PARAMETERS p_gsber LIKE bseg-gsber.
AT SELECTION-SCREEN ON p_gsber .
SELECT COUNT( * ) FROM tgsb INTO sy-dbcnt
WHERE gsber = p_gsber.
IF sy-dbcnt <> 1.
MESSAGE e000(fb) WITH 'pls enter correct b-aerea!'.
ENDIF.
regards Andreas
03-24-2005 10:33 AM
hey
i am sorry, i retrieved the gsberlist into INternal table xtab using Company code with FM. now i want to check inputed gsber exist in Internal table or not.
how to check in internal table.
can u give example.
Message was edited by: ambi chan
Message was edited by: ambi chan
03-24-2005 10:35 AM
Hi,
If you want to assign company and b-aerea
You've to create a Z-Table e.g. Z001
With fields:
Name key
Mandt X
Bukrs X
Gsber X
And now you can check the use of the combination of company code / b-aerea
SELECT COUNT( * ) FROM Z001 INTO sy-dbcnt
WHERE bukrs = p_bukrs
AND gsber = p_gsber.
Regards Andreas
03-24-2005 11:07 AM
why below code is not working.
-
DATA:BEGIN OF GSBER_TAB occurs 0.
include structure RGSB4.
DATA:END OF GSBER_TAB.
read table gsber_tab with key from = p_bukrs binary search.
-
why the above read statement does not matches? "from" field in structure RGSB4 does not takes the value why? am i wrong somewhere.
could you pls confirm.
ambichan.