cancel
Showing results for 
Search instead for 
Did you mean: 

PO Display

Former Member
0 Kudos

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..

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

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

Former Member
0 Kudos

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 ...

Former Member
0 Kudos

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

Former Member
0 Kudos

Thanks..

If i write the code what u wrote it will display only the layout which are hard coded..such as terms and conditions..it won't display the PO details which will be getting in the ITS level..

Hope u understood my requirement..

Former Member
0 Kudos

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

Former Member
0 Kudos

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..

Former Member
0 Kudos

Hi

You can send me the details at

atul.kant@gmail.com

Regards

- Atul

Former Member
0 Kudos

Thanks Atul!!

I have got one solution..i have implemented it..

My Problem is solved..

Message was edited by:

Srikanth Kota

Former Member
0 Kudos

Excellent !! )

Good to hear that your problem is resolved.

If possible, Please share your code & other details with the whole SRM community including me on my email id. )

Regards

- Atul

Former Member
0 Kudos

Atul,

One more thing is I have added a pushbutton 'Preview' in the selection-screen when i click on that preview it should display that PO layout in the PDF format in a popup how to acheive this....

Thanks

Former Member
0 Kudos

Hi

sure. Will do.

Please send me the details - code written, what is (output) happening now and what is expected output in the form of screen shots to my mail.

Regards

- Atul

Former Member
0 Kudos

Hi Atul..

Any Update of this Issue...

Thank u

.

Former Member
0 Kudos

Yes.. pls check your mail

Regards

- Atul

Former Member
0 Kudos

Thanks for u mail!

I m unable to find out the FM to view the PDF file from the PC...

Pls help..

Answers (1)

Answers (1)

Former Member
0 Kudos

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