2007 Jan 19 10:36 AM
Hi i have a doubt in selection screen I had given statement as below now i can see the output screen and i'm getting the output also now i want to know the value of only one vendor. If i had given a vendor number it must select the particular data of that vendor only can u give me any suggestions please
SELECTION-SCREEN BEGIN OF BLOCK P WITH FRAME TITLE TEXT-000.
PARAMETERS: VENDORNO like EKKo-LIFNR,
PURORG like EKKO-EKORG,
PLANT like EKPO-WERKS,
PURDOC like EKKO-BEDAT.
SELECTION-SCREEN END OF BLOCK P.
Hi i have a doubt in selection screen I had given statement as below now i can see the output screen and i'm getting the output also now i want to know the value of only one vendor. If i had given a vendor number it must select the particular data of that vendor only can u give me any suggestions please
SELECTION-SCREEN BEGIN OF BLOCK P WITH FRAME TITLE TEXT-000.
PARAMETERS: VENDORNO like EKKo-LIFNR,
PURORG like EKKO-EKORG,
PLANT like EKPO-WERKS,
PURDOC like EKKO-BEDAT.
SELECTION-SCREEN END OF BLOCK P.
2007 Jan 19 10:39 AM
Hi Pavan ,
Do you mean to have a constant value for the vendor and make it input disabled.
Regards
Arun
2007 Jan 19 10:44 AM
No as i have selected all standard tables in which i have all data so if i give a particular vendor number such as 10000006 then it should select only the in that vendor address like its company code, purchase order, purchase document etc.,
2007 Jan 19 10:52 AM
Hi Pavan ,
I dont think this is possible because the same vendor can interact with a number of purchase organizations , and will surely have a number of Purchase documents assigned to him , so i dont think this is functionally fesable , yes technically we can get some data from the table and populate rest of you selection screen elements , but i dont think this will be of much help.
Regards
Arun
2007 Jan 19 11:04 AM
ok let me explain you clearly sir what i want if i'm not selecting vendor number or any thing it was directly displaying the output of all values i mean all vendor numbers and if i try to select only one vendor number then also it was dislpaying all the vendor records now i have to pass a command as if i give a particular vendor number then it has to select that particular vendor details but not all vendors
Ex: if i select Vendor No 10000006 then it should dislpay the values or data related to that vendor address but not all values starting from 10000000
2007 Jan 19 11:14 AM
What i understand is that currently your program is not selecting data based on the vendor you enter , but irrespective of what value of vendor you enter it select data for all the vendors.
This is not a selection screen issue but it is with the select statement.
If you paste your code we may be able to help you out better in this case.
Regards
Arun
2007 Jan 19 11:33 AM
yes Mr.Arun you are right i want the database of the particular vendor number for which i had enter
2007 Jan 19 11:54 AM
Hi ,
I did not understand what you ment by data base of the vendor , if you want the basic information about the vendor i.e.his name , address e.t.c , then it is in table LFA1.
To be frank i am still have a very vague idea of what you want to acheive .
Regards
Arun
2007 Jan 19 10:40 AM
Hi .
If you mean that you want the remaining fields to be populated with the values from the vendor. Then what you have to do is use the FM DYNP_VALUES_UPDATE in the AT SELECTION SCREEN OUTPUT.
If you search the forum with the FM <b>DYNP_VALUES_UPDATE</b> .You will get many example.s
2007 Jan 19 10:40 AM
The select on this will display the detials of <b>one</b> vendor only .
May be the vendor is having more than one entry but still in your report out put the vendor number will be the same .
can you give the complete code .
regards,
vijay.
2007 Jan 19 10:45 AM
ok the vendor may have more entries but i want all the details of that vendor number
2007 Jan 19 11:14 AM
ok let me explain you clearly sir what i want if i'm not selecting vendor number or any thing it was directly displaying the output of all values i mean all vendor numbers and if i try to select only one vendor number then also it was dislpaying all the vendor records now i have to pass a command as if i give a particular vendor number then it has to select that particular vendor details but not all vendors
Ex: if i select Vendor No 10000006 then it should dislpay the values or data related to that vendor address but not all values starting from 10000000
2007 Jan 19 10:58 AM
Hi ,
I think you need to use selection-screen evetn AT SELECTION-SCREEN OUTPUT .
In this event write your select query fetching the dat for this vendor alone selecting the data you require and then displaying the same.
Regards,
Sunmit.
2007 Jan 19 11:15 AM
Hi Pavan,
<b>I think this is what u required when u select vendor number automatically for that particular vendor u require values in the remaining 3 parameter fields.
</b>
REPORT zex31 .
PARAMETERS: vendorno LIKE ekko-lifnr,
purorg LIKE ekko-ekorg,
plant LIKE ekpo-werks,
purdoc LIKE ekko-bedat.
DATA: dynfields TYPE TABLE OF dynpread WITH HEADER LINE.
DATA: return TYPE TABLE OF ddshretval WITH HEADER LINE.
AT SELECTION-SCREEN ON VALUE-REQUEST FOR vendorno.
CALL FUNCTION 'F4IF_FIELD_VALUE_REQUEST'
EXPORTING
tabname = 'EKKO'
fieldname = 'LIFNR'
dynpprog = sy-cprog
dynpnr = sy-dynnr
dynprofield = 'VENDORNO'
TABLES
return_tab = return
EXCEPTIONS
field_not_found = 1
no_help_for_field = 2
inconsistent_help = 3
no_values_found = 4
OTHERS = 5.
BREAK-POINT.
REFRESH dynfields.
READ TABLE return WITH KEY fieldname = 'VENDORNO'.
Add it back to the dynpro.
dynfields-fieldname = return-retfield.
dynfields-fieldvalue = return-fieldval.
APPEND dynfields.
Get the company code from db and add to dynpro
DATA: xekko TYPE ekko,
xekpo TYPE ekpo.
CLEAR xekko.
CLEAR xekpo.
SELECT SINGLE * INTO xekko
FROM ekko
WHERE lifnr = return-fieldval.
dynfields-fieldname = 'PURORG'.
dynfields-fieldvalue = xekko-ekorg.
APPEND dynfields.
dynfields-fieldname = 'PURDOC'.
dynfields-fieldvalue = xekko-bedat.
APPEND dynfields.
SELECT SINGLE * INTO xekpo
FROM ekpo
WHERE ebeln = xekko-ebeln.
dynfields-fieldname = 'PLANT'.
dynfields-fieldvalue = xekpo-werks.
APPEND dynfields.
Update the dynpro values.
CALL FUNCTION 'DYNP_VALUES_UPDATE'
EXPORTING
dyname = sy-cprog
dynumb = sy-dynnr
TABLES
dynpfields = dynfields
EXCEPTIONS
OTHERS = 8.
START-OF-SELECTION.
| User | Count |
|---|---|
| 6 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |