on 09-12-2007 4:15 PM
Hi all.
iam having a problem in smart forms
itab has 3 fields
id matnr werks
1 a p1
1 b p2
1 c p3
2 b l1
2 c l2
3 q u1
3 l u2
i neead output like in the smart form
-id = 1-
a p1
b p2
c p3
-id = 2-
b l1
c l2
-id = 3-
q u1
l u2
I have aloop in main window
itab into wa_itab.
then i have program lines
iam writing any perform statment insted iam write the code in here
input paramters wa_itab-id
output paramters id
i declared id type zabc-id under global data in global definations
CLEAR : ID.
ON CHANGE OF WA_itab-ID.
*BREAK point.
ID = WA_ITab-iD.
ENDON.
after the program lines i have a text
/: if &id& ne ' '.
---id = &id& ---
/: endif
&wa_itab-matnr& &wa_itab-werks&
now i see the output
-id = 1-
a p1
-id=- i don't need this (&id& has no value)
b p2
-id=- i don't need this
c p3
-id = 2-
b l1
-id=- i don't need this
c l2
-id = 3-
q u1
-id=- i don't need this
l u2
I checked my code if two items have same id the id has no value and you can see the output also
but for some reason its still goinng into the if condition
And also is there away that i can debugg my text elements like in scripts. my break point doesn't take me to the text elements
Thanks
1. Move only the ID into one internal table say i_id,
2. Now in your smartform, create a table and loop at i_id into wa_id.
3.Print your ID in a text, &wa_id-id&
3. Now in main area of the table Create a loop with the internal table you mentioned above with 3 elements, say, i_data into wa_data give CONDITION as wa_data-id = wa_id-id.
4. Print your other values &wa_data-matnr& &wa_data-werks&
5. outside main area, clear the work areas.
This should work fine as i use the same logic in one of my current developments!!!
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You can use break username at Program lines in order to debug it.
You can use one temporary sturucture in smartform ,once condition is satisfied ,move the values to that structure ,print this structure ,this can done by program lines using input and output parameters.
Thanks
Seshu
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
85 | |
10 | |
10 | |
10 | |
7 | |
6 | |
6 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.