‎2009 Feb 24 6:23 AM
hi ,
I am trying to use 4 tables for smartform instead of one but ,if i use nested loop it is not giving me results . the four tables used are :-
header - po no
Details - po details
address
and shipping address
when i define the tables in the form Interface ii have given associated type as like. .what might be the reason as the data is populated in the tables but not bieng passed .
‎2009 Feb 24 6:29 AM
Why you are using nested loops, you can simple use work area for Header details and Loop for Item details. You can get Shipping address from Header details itself. First question are u getting data into smartform. Put break point in the smartform programming lines and debug where it is going wrong.
‎2009 Feb 24 7:29 AM
Phanindra please elaborate . i am passing tables using function m,odule in following way.
CALL FUNCTION 'SSF_FUNCTION_MODULE_NAME'
EXPORTING
formname = 'Z9MSK_SMARTFORMS1'
VARIANT = ' '
DIRECT_CALL = ' '
IMPORTING
fm_name = fm_name
EXCEPTIONS
no_form = 1
no_function_module = 2
.
IF sy-subrc <> 0.
WRITE : 'Smart form name not recognised'.
ENDIF.
"'/1BCDWB/SF00000709'
CALL FUNCTION fm_name
EXPORTING
ARCHIVE_INDEX = ARCHIVE_INDEX
ARCHIVE_INDEX_TAB = ARCHIVE_INDEX_TAB
ARCHIVE_PARAMETERS = ARCHIVE_PARAMETERS
CONTROL_PARAMETERS = CONTROL_PARAMETERS
MAIL_APPL_OBJ = MAIL_APPL_OBJ
MAIL_RECIPIENT = MAIL_RECIPIENT
MAIL_SENDER = MAIL_SENDER
OUTPUT_OPTIONS = OUTPUT_OPTIONS
USER_SETTINGS = 'X'
IMPORTING
DOCUMENT_OUTPUT_INFO = DOCUMENT_OUTPUT_INFO
JOB_OUTPUT_INFO = JOB_OUTPUT_INFO
JOB_OUTPUT_OPTIONS = JOB_OUTPUT_OPTIONS
TABLES
po_header = po_header
po_details = po_details
it_address = it_address
it_t001w = it_t001w
EXCEPTIONS
FORMATTING_ERROR = 1
INTERNAL_ERROR = 2
SEND_ERROR = 3
USER_CANCELED = 4
.
Then in the smartform
loop (loop at po_header)
i into
wa_po_header
Then using flow logic one more loop
loop (loop at po_details )
using where condition
where ebeln = wa_po_header-ebeln
Edited by: MSK on Feb 24, 2009 8:30 AM
‎2009 Feb 24 7:03 AM
hi,
Make use of joins on the tables and write the select query.
This will resolve ur issue.
‎2009 Feb 24 7:16 AM
But if i want One purchase Order on one page how do i apply PAge break?
‎2009 Feb 24 7:18 AM
Hi,
check the internal table before for initial .dont use nested loop instead use join statement .
‎2009 Feb 24 9:07 AM
Hi,
Create Two Structures in SE11 based on the fields ie for all header data keep one structure and item data keep one structure. So it is very esay to pass data and no need to use nested loop in the samrtforms.
Thanks
Srilatha
‎2009 Mar 03 11:35 AM
hi shrilata,
IF no looping is required how to pass the data in import parameter ? please elaborate .Secondly i am having query regarding the tow page formate
i have two pages
Page1
Page2
I want first purchase orde ron first page of smartform and next one on page 2
But when i give condition on table 1
where i have looped on it_Final containing all the data . NExt page is displayed as blank . i have given condiotion in command as
if wa_final-flag = 'x'
Got to NExt page.
kindly help as to how to pass data and can the main window of the page1 be same as that of page2 .i.e i have made copy of main window from page1 to page2