cancel
Showing results for 
Search instead for 
Did you mean: 

Printing issue in smartform

Former Member
0 Kudos

Hi there,

I have an issue in printing the number of copies in Smartform.

For some outbound deliveries the number of copies(1) are printing correctly as per the item numbers.

Only in one case, the number of copies in print preview are showing 4copies, though there is only one page of item numbers to be printed.

all the item numbers(in this case we have 3 items) are printing in remaining 3 pages. The items are repeatedly printing(all 3 items in each page).

The issue is happening in PRD system, the functional guy cannot repeat this in Dev/Quality system, bcoz its happening only for one particular Doc no.

Please help me in finding out what could be the possible problem?

Thanks in advance.

Regards,

Priya

Accepted Solutions (0)

Answers (1)

Answers (1)

Former Member
0 Kudos

Debug/check your internal table and logic you have used for copies. I am sure you must be using some counter and index variables to build no. of copies logic. check those variables once again.

Paste your coding here, this will give more visibility.

Regards,

Deepti

Former Member
0 Kudos

Here is the code, where the print parameters are maintained.

   LF_REPID = SY-REPID.

   CALL FUNCTION 'WFMC_PREPARE_SMART_FORM'
        EXPORTING
             PI_NAST       = NAST
             PI_ADDR_KEY   = IS_ADDR_KEY
             PI_REPID      = LF_REPID
        IMPORTING
             PE_RETURNCODE = CF_RETCODE
             PE_ITCPO      = LS_ITCPO
             PE_DEVICE     = LF_DEVICE
             PE_RECIPIENT  = CS_RECIPIENT
             PE_SENDER     = CS_SENDER.

   IF CF_RETCODE = 0.
     MOVE-CORRESPONDING LS_ITCPO TO CS_COMPOSER_PARAM.
*   CS_CONTROL_PARAM-NO_OPEN
*   CS_CONTROL_PARAM-NO_CLOSE
     CS_CONTROL_PARAM-DEVICE      = LF_DEVICE.
     CS_CONTROL_PARAM-NO_DIALOG   = 'X'.
     CS_CONTROL_PARAM-PREVIEW     = XSCREEN.
     CS_CONTROL_PARAM-GETOTF      = LS_ITCPO-TDGETOTF.
     CS_CONTROL_PARAM-LANGU       = NAST-SPRAS.
*   CS_CONTROL_PARAM-REPLANGU1
*   CS_CONTROL_PARAM-REPLANGU2
*   CS_CONTROL_PARAM-REPLANGU3
*   CS_CONTROL_PARAM-STARTPAGE
   ENDIF.

I checked the structure of NAST is same as the other document where the number of copies are printing correctly. Will there be anything to do with  "IS_ADDR_KEY"?

Former Member
0 Kudos

Even in debugging I found TDCOPIES  as '001' in both the Docnumbers( Docno: which printing correctly and other with the problem). But Dont know how it is printing 4 copies in print preview.

Any Idea?

Regards,

Priya

Former Member
0 Kudos

I dont think problem is with  'is_addr_key'. I was thinking it should be somewhere in config where NACH table entries were set or could be NAST structure. But as you said that you have already checked NAST and its picking '001' then Is there is any logic written in form that is impacting this.

I guess only solution left is to debug smartform and Check varaible SFSY-COPYCOUNT ( this variables keeps count of the copy).

Pls check and let me know.

Regards,

Deepti

Former Member
0 Kudos

Hi Deepti,

Yes,even I feel that problem should be in the FORM. As the issue is in PRD, I cannot login to SMARTFORMS and check the issue.

Any ways to check the form in PRD?

Rgs,

Priya

Former Member
0 Kudos

If you get a Function module name which is generated from Smartform then you can debug or put a breakpoint in program where you are calling smartform and debug. You can also get FM name in debugging.

This might solves your issue.

Regards,

Deepti