on 06-11-2010 1:13 PM
Hello,
Iu2019m just a beginner with Interactive Forms but maybe there is someone who could help me with the following issue:
In my first form I have to display some columns from the table VBFA (Sales Document Flow) One of the columns (RFWRT- Reference value) contains the amount. The cumulative value of this column must also displayed in the form. So Iu2019ll capable to import the table with table type VBFA_T into the form. If I drag the table on the layout I see the contents of the field RFWRT.
But my question is how could I include the cumulative field to the table? Just describe the steps in more detail how to do this. Here there is a part of the interface code I already have:
DATA: VBFA TYPE VBFA_T,
ERROR_STRING TYPE STRING,
RETURN LIKE BAPIRETURN1.
SELECT *
INTO WA_VBFA
FROM VBFA
WHERE VBELV =
AND VBTYP_N = 'M'.
APPEND WA_VBFA TO VBFA.
ENDSELECT.
Now call the generated function module.
CALL FUNCTION FM_NAME
EXPORTING
/1BCDWB/DOCPARAMS = FP_DOCPARAMS
VBFA = VBFA
IMPORTING
/1bcdwb/formoutput =
EXCEPTIONS
USAGE_ERROR = 1
SYSTEM_ERROR = 2
INTERNAL_ERROR = 3
OTHERS = 4.
Kind regards,
Richard Meijn
In the backend, count your sum and add it to the table as extra row. Use some other field, not needed for anything else to put some X to understand it is a sum row in the form (just in case you would like to color the row in the form or something).
To do as much as you can in the backend is the common approach in Adobe forms.
Regards Otto
p.s.: Would you consider to help some other people to keep some balance between posts and points count? Would be cool to help as you´re helped.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I just copied the table to a new table and calculated the new value in that table.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Otto,
It's my own interface so I could change what I want but I'm going to follow your solution.
Kind regards,
Richard Meijn
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
I'm going to follow an other way.
I'm going to include a second table VBFA as global type and use the desired field as cumulative field. I'll calculate the cumulative amount in the interface section.
Kind regards,
Richard Meijn
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
If I were you:
1) the form is most probably with the SAP standard interface, right? So you cannot change the interface because the program which calls the form would stop working.
2)... but you can easily add some elements and make them optional and use them not from the calling program "phase", but from the "interface phase".
3) that means: create a ZZVBFA, include the VBFA fields (I hope you know how to do it) and add a field for the cumulative sum and a field for X meaning that this is a sum row.
4) fill this table in the interface when looping at the original VFBA table
hope the whole process is clear. Regards Otto
If I open the interface and open the tree "Form Interface" and the "Import" level I see the parameter and the type name.
In my case Parameter name = VBFA and the Type Name = VBFA_T. The table type VBFA_T has a line type VBFA which is a clustered table. I'll could appends the structure with the cumulative field in SE11 but is it possible to do it on a nice way to create a new (Clustered) table ZVBFA with structure VBFA and append the desired field there?
I'm so far I know not able to add a (cumulative) field to a new created table/view because VBFA is a clustered table.
Kind regards,
Richard Meijn
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Otto,
Yes this is what I want.
Could you explain to me how I could add an extra column to the structure?
Kind regards,
Richard Meijn
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
1) go to the interface of the form
2) find out the node to enhance
3) open the structure, edit, add column
4) go to sfp, refresh left to get a newest version of the interface
5) delete the form context (right)
6) drag from left to right
7) in your form (LCD) you should be able to see the new data column
regards Otto
Otto,
Thanks for your answer but I don't want the sum of a field in a table but the cumulative of the field.
Could you descibe in more detail how to add a column to the table to get the desired colunm.
Kind regard,
Richard Meijn
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.