cancel
Showing results for 
Search instead for 
Did you mean: 

Displaying multiple lots on the Standard script

former_member222860
Active Contributor
0 Kudos

Dear All,

I am working on the modification of standard script QM_QCERT_01 to print the multiple inspection lots for the delivery, as the standard script doesn't support this functionality. But I am unable to display the multiple inspections on the new-pages with the default Header and Footer.

Alternatively, trying to migrate the sapscript to smartform, but wondering on how to migrate its corresponding Driver Program QCAAP00.

Please throw some hints, on this requirement.

BR

MR

Accepted Solutions (0)

Answers (2)

Answers (2)

nabheetscn
Active Contributor
0 Kudos

Can you please check whether you can use smartform in place of script in configuration. Secondly if the answer is no then you need to make a zcopy of the driver program and do corresponding adjustments.

Nabheet

former_member222860
Active Contributor
0 Kudos

Hi,

Converting into Smartform appears to be more tedious, as the script driver program involves so much of logic. And i have copied the standard script program into z-progam, but facing the problem for displaying multiple inspection lots for a Deilvery on the individual pages.

Let me know, if you've any suggestions on the same.

Regards

MR

nabheetscn
Active Contributor
0 Kudos

If you want to printone inspection lot per page than than you can make use of belowmentioned code after each write_form for inspectoion lot line. Or else you can have them in SAP scritp also.

CALL FUNCTION 'CONTROL_FORM' 
EXPORTING 
command = 'NEW-PAGE'.

Thanks

Nabheet

naresh_bammidi
Contributor
0 Kudos

what are the issues you are facing while printng multiple lots,please let me know.

with regards

Naresh

former_member222860
Active Contributor
0 Kudos

Hi Nabheet,

I have made use of that function in my driver program, but the page break is not happening at the intended location. Though it is printing the equal number pages for the same number inspections lots, but the inspection lots are printing continuosly one after the other and the rest of the pages are coming blank with their headers and footers.

It might be probably, the NEW-LINE command is triggering at the wrong place.

Please let me know, if any of you came accross the same issue.

BR

MR

naresh_bammidi
Contributor
0 Kudos

Hi,

call the function module control_form in between the loop.

Loop at <itab>

call function write_form.

if sy-subrc eq 0.

call function control form

endif.

endloop.

former_member222860
Active Contributor
0 Kudos

Hi Naresh,

My FM is placed in between the loop only, and hence the display has been appearing with so many pages for as many loop iterations the itab is having.

But Page-break is not happeing for individual lots, as it is complex logic and could not figure-out where that point will trigger.

thanks.

naresh_bammidi
Contributor
0 Kudos
But Page-break is not happeing for individual lots,

Mahesh,

i couldn't figure out the above line,could you explain your exact requirement.

with regards

Naresh Bammidi

former_member222860
Active Contributor
0 Kudos

Naresh,

Assume, a Header contains multiple line-items and i would like to print all these line-items on individual pages with their headers and all the rest of the header and footer details.

In my case, i am able to print these line-items continously one after the other extending to the next pages, but i need to print them individually instead.

Hope I am clear about the requirement.

Thanks

naresh_bammidi
Contributor
0 Kudos

yes,now got your requirement.

remove the function module in between the loop and write the code in scrip form before the line items printing.

for eg:

/e  100
/:   new-page
*   &e_mara-matnr&,,&e_mara-ernam& "lets assume here you are printing your line items

former_member222860
Active Contributor
0 Kudos

Thanks Naresh,

I tried that too, and it gives the same output as i am getting earlier.. Let me try something else.

naresh_bammidi
Contributor
0 Kudos

In my case it's working,re check your code.

nabheetscn
Active Contributor
0 Kudos

Please check whether your form is moved correctly in test client via scc1.

former_member222860
Active Contributor
0 Kudos

Hi,

I have found the exact location of the page-break requirement, and called the Control_Form for New-Page with as many number of times as the itab is having.

Thanks for the support..

Best Regards

naresh_bammidi
Contributor
0 Kudos

Hi,

i believe that ,you should also copy the standard driver program and comment all write_forms and call the funmction module ssf_function_module_name .

with regards

Naresh