cancel
Showing results for 
Search instead for 
Did you mean: 

Submit statement in smartform?

Former Member
0 Kudos

Hello,

is it okay to submit another program from smartform.

i have created a smartform. and in between table cells,

somewhere i have inserted program lines.

i want to pass p.o no and p.o item no to some another prog.

which actually calculated taxes on p.o item.

the code which i have written in program lines:

*Prepare Selection Table

WA_SEL_TAB-SELNAME  = 'P_EBELN'.

WA_SEL_TAB-KIND = 'P'.

WA_SEL_TAB-SIGN = 'I'.

WA_SEL_TAB-OPTION = 'EQ'.

WA_SEL_TAB-LOW = WA_FINAL-RDOC1.

WA_SEL_TAB-HIGH = WA_FINAL-RDOC1.

APPEND WA_SEL_TAB TO SEL_TAB.

CLEAR WA_SEL_TAB.

WA_SEL_TAB-SELNAME  = 'P_EBELP'.

WA_SEL_TAB-KIND = 'P'.

WA_SEL_TAB-SIGN = 'I'.

WA_SEL_TAB-OPTION = 'EQ'.

WA_SEL_TAB-LOW = WA_FINAL-ITEM1.

WA_SEL_TAB-HIGH = WA_FINAL-ITEM1.

APPEND WA_SEL_TAB TO SEL_TAB.

CLEAR WA_SEL_TAB.

*Prepare Selection Table

SUBMIT ZNEW_BAPI3 WITH SELECTION-TABLE SEL_TAB

AND  RETURN

EXPORTING LIST TO MEMORY.

IMPORT P_MWSBP FROM MEMORY ID 'PO_TAX'.

but system is thorwing syntax check error.

it says:

Field "SEL_TAB" is unknown. It is neither in one of the specified tables nor def

however i have defined sel_tab and wa_sel_tab in global definations of the smartform.

like this:

SEL_TAB TYPE TABLE OF RSPARAMS. "in global defination.

WA_SEL_TAB LIKE LINE OF SEL_TAB.

"also i have declared both of these in input and output parameters

"of the program lines node of smartform.

Plz correct me , where i am mistaken.

or let me know if its not possible to perform

submit statement from within the smartform.

Accepted Solutions (1)

Accepted Solutions (1)

raymond_giuseppi
Active Contributor
0 Kudos

Look at Program Lines in Smart Forms / Advanced Form Development for "Visibility Rules".

You can use the following variables:

  • Global fields (fields from the global definitions or from the form interface), which you enter in the tables Input parameters and Output parameters of the General Attributes tab.
  • Variables that you define locally within the program lines node.

Regards,

Raymond

Former Member
0 Kudos

have a look at my earlier post,

i said that i have declared both SEL_TAB AND WA_SEL_TAB in input / output

parameters of program lines code.

also in global definations.

still, the system is throwing this error.

i am attaching the screenshots of both declarations.

thats how my declarations exist in globally:

and in input/ ouput parametrs of program lines node:

this is the error msg.


bharat_rathod2
Active Participant
0 Kudos

dear,

declare wa_sel_tab type rsprams insted of like line of sel_tab.

Former Member
0 Kudos

thanks bharat. problem solved.

but i guess there is no difference between these both declarations.

data wa_sel_tab like line of sel_tab.

or

data wa_sel_tab type rsparams.

bharat_rathod2
Active Participant
0 Kudos

so what is the actual problem dear?

raymond_giuseppi
Active Contributor
0 Kudos

I suppose that when the syntax-check is executed pevious line of the global data are not actually activated, so the compiler/syntax checker look in Types tab and in ddic, but not in previous lines ?

Answers (2)

Answers (2)

former_member565026
Participant
0 Kudos

Hi Abhishek,

i think  u forgot to declare  table and work area

input output parameters  in ur  code lines


bharat_rathod2
Active Participant
0 Kudos

Dear,

Please declare sel_tab in global defination

then

put wa_sel_tab in input pareameter and put wa_sel_tab and sel_tab in output parameter in smartforms programmeline