Application Development Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 

smartforms

Former Member
0 Kudos

I printed multipole sales order in smartforms but how to spit the sales order (one sales order in one page )please me on this

10 REPLIES 10

vipinsaraika
Participant
0 Kudos

Loop your sales order table when calling the smart form function module

FredericGirod
Active Contributor
0 Kudos

In your smartforms, when you call the corresponding function module, you are suppose to populate a structure type SSFCOMPOP.

In this structure you have several fields:

  • TDNEWID : Open a New Spool
  • TDFINAL: Close the spool

if you set ABAP_TRUE to this two parameters, SAP will create one spool for each form.

vipinsaraika
Participant
0 Kudos
  outparams-preview   = 'X'.  " To get the preview of the form
      outparams-nodialog = 'X'.  " To hide the print priview screen
      CALL FUNCTION 'FP_JOB_OPEN'
        CHANGING
          ie_outputparams = outparams
        EXCEPTIONS
          cancel          = 1
          usage_error     = 2
          system_error    = 3
          internal_error  = 4
          OTHERS          = 5.
      IF sy-subrc <> 0.
* Implement suitable error handling here
      ENDIF.
      CALL FUNCTION 'FP_FUNCTION_MODULE_NAME'
        EXPORTING
          i_name     = 'Z_HCM_FORM_CA' "LV_NAME
        IMPORTING
          e_funcname = lv_name
*         E_INTERFACE_TYPE           =
*         EV_FUNCNAME_INBOUND        =.

 CALL FUNCTION lv_name "'/1BCDWB/SM00000039'
        EXPORTING
          /1bcdwb/docparams   = fp_docparams
         wa_final            = ls_emp_details          
* IMPORTING
*         /1BCDWB/FORMOUTPUT  =
        EXCEPTIONS
          usage_error         = 1
          system_error        = 2
          internal_error      = 3
          OTHERS              = 4.
      IF sy-subrc <> 0.
* Implement suitable error handling here
      ENDIF.

      CALL FUNCTION 'FP_JOB_CLOSE'
*   IMPORTING
*     E_RESULT             =
        EXCEPTIONS
          usage_error    = 1
          system_error   = 2
          internal_error = 3
          OTHERS         = 4.
      IF sy-subrc <> 0.
* Implement suitable error handling here
      ENDIF.
    ENDIF.
        

Sandra_Rossi
Active Contributor
0 Kudos

It seems that your question is not very clear as I understand differently from other people here.

In your Smart Form, you can define a Command Node with Go To Next Page which will generate a new page. You can embed the Command Node inside an Alternative Node, or in a Sort break event of a Table or Loop Node.

Former Member
0 Kudos

Thanks for respond the smarforms

Former Member
0 Kudos

Hi

In smart form I already printed sale order numbers but what is my question

know

example:- 0,1,2,3 like sales order we have this three are printing one page now.

I want to print 0 is one page

I want to print 1 is next page

I want to print 2 is next page

I want to print 3 is one page

like this i need to print in smart form

Sandra_Rossi
Active Contributor

I did understand that you printer the sales order numbers. My answer was about adding a page break between the numbers. Please clarify your question.

Former Member
0 Kudos

adding a page break between the number

raymond_giuseppi
Active Contributor
0 Kudos

There should already be a TABLE / LOOP node in your form based on some Sales Order internal table.

In the table Data tab, the field SO number should already been defined as a sort criteria, if not already done check the 'Event on Sort Before' box.

An event box should now be displayed, under this node add a first node of type 'command', in this node check the box 'go to new-page' and add a condition to prevent new-page for the first document.

julieplummer20
Product and Topic Expert
Product and Topic Expert
0 Kudos

Hi Former Member, This is nothing to do with abap_trial.

Please only add the hashtag to developer edition questions.

Thanks Julie.