on 03-26-2007 8:51 AM
Hi all,
I have created a Zsmartform and i have replaced the standard display of PO details(When we go to ITS and there we see the preview) with this zsmartform..its working fine...but when i write a zreport in which i called my smartform to view the PO detail it is showing the PDF file without any PO details it is showing the terms and conditions and other things..
How can i call my PO Details which are displayed in the ITS to be displayed in the GUI..
Hi,
standard PO smartform uses couple of FM's to fill necessary data. If your Z Smartform shows only terms and contitions its seems you don't put any PO guid or number in it.
Regards,
Marcin
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Thanks for reply..
My smartform is working fine in ITS..
My requirement i have created a zreport in which i will give my PO number as input and in the o/p my zsmartform to be called (this PO layout should be my PO details layout which is displayed in the ITS)..
How to call the ITS PO layout in my zreport ...
Hi
Incase you want code in this case, please refer this.
<b>Here is a sample code which may help.</b>
report zatul_sf.
data it_final type standard table of zdemo.
data: gv_form_name type tdsfname.
data: v_fuc_mod_name type rs38l_fnam.
parameters: p_ebeln like ekko-ebeln.
initialization.
gv_form_name = 'ZATUL_DEMO'.
start-of-selection.
perform f_get_data.
end-of-selection.
perform f_call_smartform.
*&---------------------------------------------------------------------*
*& Form F_GET_DATA
*&---------------------------------------------------------------------*
* text
*----------------------------------------------------------------------*
* --> p1 text
* <-- p2 text
*----------------------------------------------------------------------*
form f_get_data .
select ebeln
ebelp
into table it_final
from ekpo
where ebeln = p_ebeln.
if sy-subrc <> 0.
* MESSAGE
endif.
endform. " F_GET_DATA
*&---------------------------------------------------------------------*
*& Form F_CALL_SMARTFORM
*&---------------------------------------------------------------------*
* text
*----------------------------------------------------------------------*
* --> p1 text
* <-- p2 text
*----------------------------------------------------------------------*
form f_call_smartform .
call function 'SSF_FUNCTION_MODULE_NAME'
exporting
formname = gv_form_name
importing
fm_name = v_fuc_mod_name
exceptions
no_form = 1
no_function_module = 2
others = 3
.
if sy-subrc <> 0.
* MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
* WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
endif.
call function v_fuc_mod_name
exporting
* ARCHIVE_INDEX =
* ARCHIVE_INDEX_TAB =
* ARCHIVE_PARAMETERS =
* CONTROL_PARAMETERS =
* MAIL_APPL_OBJ =
* MAIL_RECIPIENT =
* MAIL_SENDER =
* OUTPUT_OPTIONS =
* USER_SETTINGS = 'X'
ebeln = p_ebeln
* IMPORTING
* DOCUMENT_OUTPUT_INFO =
* JOB_OUTPUT_INFO =
* JOB_OUTPUT_OPTIONS =
tables
it_final = it_final[]
exceptions
formatting_error = 1
internal_error = 2
send_error = 3
user_canceled = 4
others = 5
.
if sy-subrc <> 0.
* MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
* WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
endif.
endform. " F_CALL_SMARTFORM
Hope this will help.
Please reward full points, incase it suits your requirements.
Incase it does not help, please let me know.
Regards
- Atul
Hi
For this purpose, you can use standard function modules
<b>CALL FUNCTION 'BBP_OUTPUT_PO_GETDETAIL_SMART'</b>
<b> CALL FUNCTION 'BBP_PD_PO_GETDETAIL'</b>
<b> CALL FUNCTION 'BBP_PD_PO_ITEM_GETDETAIL'</b>
<b> CALL FUNCTION 'BBP_PD_PO_GETLIST'</b>
<b><u>Here is one more Sample code.</u></b>
<u>*--- Get all the data out of PO that we need for smartform</u>
CALL FUNCTION 'BBP_OUTPUT_PO_GETDETAIL_SMART'
EXPORTING
iv_po_guid = lv_guid
io_appl_object = io_appl_object
iv_smartform = ip_smart_form
* IV_SMARTFORM_MAIL =
iv_medium = lc_medium
IMPORTING
sf_po_data = ls_sf_po
ev_langu = lv_langu
ev_smartform = lv_smartform
* EV_SMARTFORM_MAIL =
* EV_SUBJECT_MAIL =
et_error_po = lt_error_po
EXCEPTIONS
data_failure = 1
OTHERS = 2.
Hope this will help.
Please reward suitable points, incase it suits your requirements.
Incase it does not help, please let me know.
Regards
- Atul
Thanks..
For this FM BBP_OUTPUT_PO_GETDETAIL_SMART...
What is the value to be passed to IV_SMARTFORM? Is it the name of the Zsamrtform (eg : IV_SMARTFORM = 'ZBBP_PO')...and what value IV_MEDIUM and io_appl_object need to be passed??
Any how GUID value will be the POs GUID..
After getting all the details what is the next step..i have wrote some code for this how to get this to PDF format..can u please send ur mail ID so that i can send to ur mail...
Thank u very much..
Hi
Which SRM version are you using ? What's the actaul business requirement ?
Seems to be you have not wriiten correct code. Please paste the code details.
Regards
- Atul
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.