‎2006 Oct 16 11:30 AM
Hi Friends,
I want to check the entries for Sales organisation in the selection screen p_vkorg (parameters)<b>vbak-vkorg.</b>
Can you pls tell me how to do it.
Thanx in advance
Venu.
‎2006 Oct 16 11:35 AM
Hello VENU,
Use this code.
<b>AT SELECTION-SCREEN ON P_VKORG.
SELECT SINGLE * FROM TVKO where VKORG = P_VKORG.
IF SY-SUBRC NE 0.
Message E000(SU) with the 'The Sales Org is not found'.
endif.</b>
If useful reward.
Vasanth
‎2006 Oct 16 11:33 AM
What exactly the requirement is? Do you want to just read the values or you also want to check whether those are present in the master data table?
To read the value from selection screen you can use FM DYNP_VALUES_READ.
Best Regards,
Vibha
*Please mark all the helpful answers
‎2006 Oct 16 11:34 AM
Hi,
I also want to check whether the values present in the database table.
Thanx,
Venu
‎2006 Oct 16 11:33 AM
AT SELECTION-SCREEN.
IF NOT P_VKORG IS INITIAL.
SELECT SINGLE VKORG FROM TVKO INTO VBAK-VKORG WHERE VKORG = P_VKORG.
IF SY-SUBRC NE 0.
*DISPLAY ERROR MESSAGE HER
ENDIF.
ENDIF.Reward points if ur problem solved , for the previous thread also
‎2006 Oct 16 11:34 AM
hi Venu,
Do this way ..
at selection-screen.
select * from vbak where vkorg = p_vkorg.
if sy-subrc = 0.
< do something>
endif.Regards,
santosh
‎2006 Oct 16 11:35 AM
Hello VENU,
Use this code.
<b>AT SELECTION-SCREEN ON P_VKORG.
SELECT SINGLE * FROM TVKO where VKORG = P_VKORG.
IF SY-SUBRC NE 0.
Message E000(SU) with the 'The Sales Org is not found'.
endif.</b>
If useful reward.
Vasanth
‎2006 Oct 16 11:36 AM
REPORT YTEST_100 .
tables vbak.
parameter p_vkorg like vbak-vkorg.
at selection-screen.
select single * from vbak into vbak where vkorg = p_vkorg.
if sy-subrc ne 0.
message s000(eo) with 'No data found'.
exit.
endif.
start-of-selection.
Regds
Manohar
‎2006 Oct 16 11:36 AM
Hi Venu,
I think you want to get the possible values for the sale Organization at the selection screen.
try: PARAMETERS : p_org type VKORG.
this will return only those values which are available in DB.
Hope this helps.
Reward points if this helps.
Manish
Message was edited by: Manish Kumar
‎2006 Oct 16 11:43 AM
hI ,
Use the following code hope it will help you to resolve u r issue.
data : r_vkorg LIKE vbak-vkorg.
AT SELECTION-SCREEN.
IF NOT p_vkorg IS INITIAL.
select single vkorg from vbak INTO r_vkorg WHERE VKORG = p_vkorg.
IF SY-SUBRC <> 0.
MESSAGE 'nodata' TYPE 'E'.
endif.
regards,