on 08-02-2010 2:41 PM
in Smartforms I have declare in Form Interface -> Import -> " wa_lastpo " type ekpo,
Now in main window create table, I have use -> Text - and in text (for PO display) -> &WA_LASTPO-EBELN&
ALSO in another text (TO DISPLAY Net price)-> &WA_LASTPO-NETPR&
see the coding :
DATA : GT_LASTPO LIKE EKPO OCCURS 0,
WA_LASTPO TYPE EKPO.
SELECT * FROM EKPO INTO TABLE GT_LASTPO
FOR ALL ENTRIES IN GT_EBAN
WHERE BANFN LE GT_EBAN-BANFN
AND NETPR = GT_EBAN-NETPR
AND MATNR = GT_EBAN-MATNR
AND WERKS = GT_EBAN-werks.
SORT GT_LASTPO BY BANFN NETPR DESCENDING.
DELETE ADJACENT DUPLICATES FROM GT_LASTPO COMPARING EBELN NETPR.
READ TABLE GT_LASTPO INTO WA_LASTPO INDEX 1.
see the above coding the last PO is displaying properly.
Now I have to retrieve Netpr from EKPO Table , how to retrieve please tell me .
Also the PO no is displaying through driver program I have to check in EKKO Table -> BSTYP = F.
How to do this ?
Regards
S J Akhtar
Answer rec own...
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
Actually, I am confused.
Reason -
1. sorting the table on banfn & netpr and deleting adjacent duplucates on vbeln & NETPR. It's wrong.
2. what is the purpose to sort & delete on netpr?
3. Even, it is not understood why you are facing issues with displaying the netpr.
Please be more specific so that you will get a better solution.
Regards,
Selva K.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi
In smartforms, for CURR and QUAN fields , you need to give their Reference fields in the Global Definitions-->Curr/Quant Fields Tab.
Here, give the internal table and field which is a currency/quantity and next to it give a variable which is declared type its reference field. For Eg. MEINS for MENGE.
Hope this solves.
Regards,
Karthik
Hi..
It could be that when you re using EBAN internal table then you might have included the reference field in the internal table itself however in case of EKPO's table, the reference field might not be included in internal table structure. In such cases you will have to declare the reference field as I had mentioned above.
Regards,
Karthik
Hi,
READ TABLE GT_LASTPO INTO WA_LASTPO INDEX 1.
This above mentioned statement itself will give both the ebeln(PO number) and NETPR (net proce value).
Suppose if you want to check whether the available PO number is of type BSTYP = 'F'.
Then write the select statement as follows.
select single ebeln from ekko into wc_ebeln where ebeln = wa_lastpo-ebeln and bstyp = 'F'.
Otherwise using join statements you can retrieve the PO data from single statement by using both the tables EKKO and EKPO.
Let me know if incase of any issues in the above points.
Regards,
prabu
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
87 | |
10 | |
10 | |
10 | |
7 | |
6 | |
6 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.