on 01-05-2007 5:31 PM
Hi,
i have developed a form with zprogram for driver program. I am having trouble in displaying the fields which i wanted to populate in the form
My primary key is vttk-tknum (transportation number)
and my select statements are like this
BEGIN OF SLK OCCURS 0
INCLUDE STRUCTURE VTRLK.
END OF SLK.
SELECT VBELN FROM VBAK
INTO (VBAK-VBELN)
WHERE VBELN = SLK-VBELN.
SELECT SINGLE NAME1
STREET
HOUSE_NUM1
STR_SUPPL1
CITY1
POST_CODE1
COUNTRY
FROM ADRC
INTO (ADRC-NAME1, ADRC-STREET, ADRC-HOUSE_NUM1, ADRC-STR_SUPPL1, ADRC-CITY1, ADRC-POST_CODE1, ADRC-COUNTRY)
WHERE ADDRNUMBER = SLK-ADDRNUMBER.
SELECT SINGLE NAME1
LAND1
ORT01
REGIO
STRAS
FROM KNA1
INTO (KNA1-NAME1,KNA1-LAND1,KNA1-ORT01,KNA1-REGIO,KNA1-STRAS)
WHERE KUNNR = SLK-KUNNR.
can some one help me in this ?
I don't understand your problem. Are your Select statements retrieving any data?
Have you tried something like this:
SELECT SINGLE NAME1
STREET
HOUSE_NUM1
STR_SUPPL1
CITY1
POST_CODE1
COUNTRY
FROM ADRC
INTO CORRESPONDING FIELDS OF TABLE ADRC
WHERE ADDRNUMBER = SLK-ADDRNUMBER.
Is there anything in SLK?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Ok, here's what I would do. Put a break point on your first Select statement.
When you reach the breakpoint. Check to see that SLK-VBELN has a value.
Hit F5 to execute the Select statement and look at SY-SUBRC or look at VBAK to see if the Select retrieved anything.
If nothing is retrieved, go to SE16 for VBAK and see if there is a record for the SLK-VBELN.
can u please tell me, in my smartform can i insert field as &kna1-name1& or do i need to use internal table.
also suppose i am just populating some fields in smart form if insert field in text and have that table defined in form interface is sufficient or do i need to declare something in global data?
I always use internal tables, so I'm not sure if &kna1-name1& will work (it should work though).
Defining the table in the interface is sufficient.
However, since it is a table without a header line, you either need to loop through the table, or if there is only one record in the table then add a Program Lines node and READ TABLE itab INTO wa_itab INDEX 1.
Hi
i didnt understand the problem.
What is the input of your zprogram? vttk/tknum?
And what structures you need to fill?
What is the signature of your generated function/module in samrtforms?
Thanks
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
84 | |
24 | |
11 | |
9 | |
7 | |
6 | |
5 | |
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.