Different text depending on number of copies (RLB_INVOICE)

Dear SDN community,
I need to print the sales invoice in three copies, in which the first copy says "Original", the second "Duplicate" and the third "Triplicate".
Looking at RLB_INVOICE coding, I noticed that the Smartform is called three times. I copied standard Smartforms LB_BIL_INVOICE and created inside the reapeat window three different text elements with the conditions query the SFSY-COPYCOUNT variable. In every call, the variable is 1.
Is there any way to archive this requisite without changing standard report RLB_INVOICE?
Naturally, changing standard report I can pass sy-tabix variable inside SF and query this variable. But shouldn´t it be possible without changing standard report?!
Thanks in advance,
MPM

Dear José,
In your solution I need to copy standard program to a Z, right?!
Since I need to create a copy, I would rather prefer to pass the sy-index variable as parameter into my SF like shown below.
Data: ld_index like sy-index.
DO nast_anzal TIMES.
* In case of repetition only one time archiving
      IF sy-index > 1 AND nast-tdarmod = 3.
        nast_tdarmod = nast-tdarmod.
        nast-tdarmod = 1.
        ls_composer_param-tdarmod = 1.
      ENDIF.
      IF sy-index NE 1 AND repeat IS INITIAL.
        repeat = 'X'.
      ENDIF.
* call smartform invoice
* MPM move sy-index to local variable
     move sy-index to ld_index.
      CALL FUNCTION lf_fm_name
           EXPORTING
                      archive_index        = toa_dara
                      archive_parameters   = arc_params
                      control_parameters   = ls_control_param
*                 mail_appl_obj        =
                      mail_recipient       = ls_recipient
                      mail_sender          = ls_sender
                      output_options       = ls_composer_param
                      user_settings        = space
                      is_bil_invoice       = ls_bil_invoice
                      is_nast              = nast
                      is_repeat            = repeat
* MPM include index parameter
                      is_index             = ld_index
           importing  job_output_info      = ls_job_info
*                     document_output_info =
*                     job_output_options   =
           EXCEPTIONS formatting_error     = 1
                      internal_error       = 2
                      send_error           = 3
                      user_canceled        = 4
                      OTHERS               = 5.
      IF sy-subrc <> 0.
*   error handling
        cf_retcode = sy-subrc.
        PERFORM protocol_update.
* get SmartForm protocoll and store it in the NAST protocoll
        PERFORM add_smfrm_prot.
      ENDIF.
    ENDDO.
Since it seems to me that my requirement is quite normal, I was looking for way to solve it using the standard program. Somebody surely had the same problem?!
To Satyajit: Yes, I used a copy window and I am checking SFSY-COPPYCOUNT. But value is always 1. I have three text elements with conditions checking SFSY_COPYCOUNT, but all copies are always original since the value of SFSY-COPYCOUNT is always 1.
To sam_ins: I will check nast structure again, but I am quite sure I checked it already and the problema is the same as SFSY-COPYCOUNT.
Thanks anyway,
MPM
Edited by: Marcelo Moreira on Dec 21, 2010 11:23 AM

Similar Messages

  • I send an email from my Iphone to a friend.  My friend receives it on her Iphone, but as text message.  She replies and it goes back to my daughter's phone, a completely different email and phone number.  Why?

    I send an email from my Iphone to a friend.  My friend receives it on her Iphone, but as text message.  She replies and it goes back to my daughter's phone, a completely different email and phone number.  Why?

    We went through my friend's phone and my daughter's email and phone number are not in it.  I have never given my daughter's iphone number to my friend.  Is it something to do with gmail or my apple id?  My daughter (14) has been using my computer as her "base" for HER Iphone. 
    My friend does use her iphone number as an email address as well.
    For instance:  her phone number might look like this:  (493) 305-3958
    and her email address would look like this:  [email protected]
    If I Iphone/email my friend, she receives it as a text message.  Then if she replies to that text message, it goes to my daughter's phone and not mine.  It's completely crazy!  We searched her phone contacts and did not find my daughter's phone number anywhere or attached anywhere to mine.  Since when does Iphone emailing wind up in the text messaging area?

  • Number of copies different

    Hello
    I would like to know if you can somehow set the number of copies printed per customers
    Ex
    Customer A : 1 copie Delivery
    Customer B : 2 copies Delivery

    Hello
    I would like to know if you can somehow set the number of copies printed per customers
    Ex
    Customer A : 1 copie Delivery
    Customer B : 2 copies Delivery

  • Aperture performs adjustments in a different order depending on file type

    Aperture performs Adjustments in a different order depending on file type.
    Here's an example:
    Starting with two copies of an image, one in RAW format (Canon CRW from a D60), the other in TIFF (opened the .crw file in Preview and exported an 8bit tiff file).
    {The test image is a photo of my copy of Aperture on the floor of my studio (which, for reference, is a few points of Cyan off of a neutral grey).}
    The original Image.
    http://members.arstechnica.com/x/adrien/testRAW_originalImage.jpg
    Adjustments
    http://members.arstechnica.com/x/adrien/adjustments.jpg
    The RAW file adjusted
    http://members.arstechnica.com/x/adrien/testRAW_adjusted.jpg
    The TIFF files adjusted
    http://members.arstechnica.com/x/adrien/testTIFF_adjusted.jpg
    Import both of these files (testRAW.crw & testTIFF.tiff) into Aperture.
    Make adjustments to the RAW and TIFF images:
    - Exposure: Saturation -> 0 (lowest possible value).
    - White Balance: Temp -> 3500K (from 5000K).
    It doesn't matter what order you perform these operations in.
    The RAW file is now a neutral greyscale image. With the Saturation set to 0, the White Balance makes no major difference in the image, it stays grey.
    The TIFF file, however, is now a blue tinted greyscale image - much like a sepia-tone effect. Moving the White Balance slider changes the color of the image.
    It appears that Aperture is performing the Saturation and WB operations in a different order: for the RAW file it first performs the WB, then the saturation; while in the TIFF file it performs the saturation first, then the WB.
    The result is the same for a JPEG image.
    The RAW behavior is the 'expected' behavior in photography - White Balance should happen 'before' the Saturation setting.
    I've filed the bug with Apple (number 4394125 at bugreport.apple.com). hopefully they'll fix this.
    Cross posted from this discussion at the MacAch on ArsTechnica forums:
    http://episteme.arstechnica.com/groupee/forums/a/tpc/f/8300945231/m/893007866731 /r/832001796731#832001796731

    Well, there are different ways of achieving this.
    Solution 1:
    You can create a new output type which will be triggered and call a same driver program and the new smart form. I am sure you can customize as to what Purchasing document type will trigger which output type. Get in touch with someone in the function team to get this configured.
    Solution 2:
    No Customizing, let the configuration be the same, but in the driver program change the value of  "TNAPR-FONAM" immediately after the form entry_neu to the new form name based on the Purchasing document type.

  • SAPScript - number of copies

    Hi all,
    I'm trying to print out a text depending om the number of copies.
    If users selects to print 2 or more copies, I want to write text "<i>ORIGINAL</i>" in the first copy, and for the following copies I want to print "<i>COPY</i>".
    How can I manage this request?
    thanks in advance

    What about reprints? 
    If someone selects 3 copies, and then two days later print another 3 copies.... what should happen?
    Is only the first printout ORIGINAL and the other five COPY?  Or is the first printout of each group ORIGINAL?
    All I can think of is doing a PERFORM in SAPscript. 
    You would pass the document number and output type as a key. 
    The CHANGING parameter could be the text string (COPY or ORIGINAL).
    When the PERFORM is called in the MAIN window (above any text elements), search the NAST table for the key. 
    If you find a successfully printed document with this key, set the string for COPY.  You have to check the status flag in NAST to make sure it is already printed.
    If you do not find an entry in the NAST table, go to a second step.
    IMPORT a value from FROM DATABASE using the key (document number and output type).  If not found, it is the first copy of the first printout.  EXPORT TO DATABASE to capture the status of the second printout in the next IMPORT step.
    Does that make sense?

  • ABAP Forms - Number of Copies

    Hello,
    I am having problems with a form that I created in SAP.  The form is for a barcode label.  The only contents of the form is a text include and a call to an external report that pulls in data.  When I call the form from a program that I wrote it always prints two copies.  However when the form is called via MIGO, it only prints one copy.  Does anyone know what could cause this?  I have looked at the number of copies field in the itcpo that I pass the OPEN_FORM function routine.  Any help would be appreciated

    Hi Ryan,
            Since you are getting two copies of same output, right. I suggest you to run the program in debug mode to see what actually happens during run time. Check simultaneously the way the program runs and the status of the list where the contents gets printed. You may come up with a solution. For debugging check this thread...
    Re: DOCUMENT_NOT_FOUND
    Hope this helps.
    Kindly, Reward points if it helps by clicking the star
    in the left hand side of the screen.
    Regards,
    Maheswaran.B

  • Call same smartform in program with different text - same result

    Hello,
    I'm facing the following problem:
    In a program, a certain smartforms form can be called multiple times. Only the text can change, depending on the user action.
    However, the resulting form does not show different text for the different actions. The first time it is used, the text is correct, but from the second time onwards, the text in the form will still be same than the first time.
    The text type in the smartform is 'include text', so I can see in the standard text transaction (so10) that the text was indeed changed correctly. But still it shows the same text in the result.
    Is there some option I have missed?
    Thanks

    Hi,
    You can use COMMIT_TEXT.
    The system keeps all text modules for which you defined 'storage in update task' in the corresponding text object in the text memory. As soon as it updates the corresponding application object, it must also place the text modules into the log file.
    The function module COMMIT_TEXT generates for the text modules in the text object a CALL FUNCTION... IN UPDATE TASK statement in accordance with the action to be executed (delete, create, change).
    No COMMIT WORK is created. This must be executed by the application program.
    If you do not specify OBJECT, NAME, ID, and LANGUAGE, the system transfers all texts from the text memory. To limit the function to certain texts, enter values (fully or generically) in the above fields. The system then selects all texts that match the selections in the fields up to the first ' * '.
    By default, the system deletes texts from the text memory as soon as they are written to the log file. If you want to keep updated texts in the text memory, call the function module with the parameter KEEP = 'X'. The system then keeps the texts in the text memory and flags them as updated. When calling COMMIT_TEXT again, the system ignores these texts. If you change such a text again during the transaction (for example, using SAVE_TEXT or DELETE_TEXT), the system deletes the flag. However, you need another COMMIT_TEXT to update the text.
    <b>Reward if helpful.</b>

  • I need to print with a number of copies set

    Hi im trying to print with number of copies set but it dosent work.. I tried it on 3 different printers.
    It only print 1 copie when i say 2 or 3 or 4...
    (aset.add(new Copies(2)); )
    Is there something missing in that code...
    thanks
    Here is my code.
    import java.io.*;
    import javax.print.*;
    import javax.print.attribute.HashPrintRequestAttributeSet;
    import javax.print.attribute.PrintRequestAttributeSet;
    import javax.print.attribute.standard.Copies;
        public class Print {
            public static void main(String[] args) {
                try {
                    // Open the image file
                    InputStream inputStream = new BufferedInputStream(new FileInputStream("c:\\coupon.txt"));
                    // Find the default service
                    DocFlavor flavor = DocFlavor.INPUT_STREAM.AUTOSENSE;
                    PrintService service = PrintServiceLookup.lookupDefaultPrintService();
                    PrintRequestAttributeSet aset = new HashPrintRequestAttributeSet();
                    aset.add(new Copies(2)); // Dosent work only 1 copie is printed
                    // Create the print job
                    DocPrintJob job = service.createPrintJob();
                    Doc doc = new SimpleDoc(inputStream, flavor, null);
                    PrintJobWatcher pjDone = new PrintJobWatcher(job);
                    // Print it
                    job.print(doc, aset);
                    // Wait for the print job to be done
                    pjDone.waitForDone();
                    // It is now safe to close the input stream
                    inputStream.close();
                } catch (PrintException e) {
                    System.out.println(e);
                } catch (IOException e) {
                    System.out.println(e);
        }

    Same problem here. I have found hundreds of questions in several places, but no answer.
    Problem is that when I set the copies, PrintServiceLookup.lookupPrintServices returns no results.
    Please help.

  • How to ask for a number of copies in Finder Print?

    How to ask for a number of copies in Print Finder Items? Thanks.
    iBook G3 700   Mac OS X (10.4.8)   Still running a paperless office on my iBook! 120gig, 640RAM, 1440 x 900 2nd monitor! 500gig FW-HD!

    Here is a script that will create a "Run AppleScript" action in Automater that should do what you want. Just click on the link and hit the Run button in Script Editor.
    I wanted to get this too you fast so there is no error checking on the text entered into the dialog. Let me know if you want it added.
    click here to open this script in your editor<pre style="font-family: 'Monaco', 'Courier New', Courier, monospace; overflow:auto; color: #222; background: #DDD; padding: 0.2em; font-size: 10px; width:400px">
    tell application "Automator"
    make new workflow
    -- Action 1
    add Automator action "Run AppleScript" to workflow 1
    set value of setting 1 of Automator action 1 of workflow 1 to "on run {input, parameters}
    tell application \"Finder\"
    activate
    set theFiles to input
    display dialog \"How many copies do you want\" default answer \"1\"
    set NumberOfCopies to text returned of the result as integer
    end tell
    repeat with aFile in theFiles
    repeat with j from 1 to NumberOfCopies
    tell application \"Finder\" to display dialog \"Printing copy \" & j & return & aFile giving up after 2
    tell application \"Finder\" to print aFile
    end repeat
    end repeat
    return input
    end run"
    end tell</pre>
    PowerBook 12"   Mac OS X (10.4.8)  

  • Again about t.code MN05: number of copies of MM documents printed

    Hi all,
    by t.code MN05 I can set the number of copies of the MM documents printed the FIRST TIME. I can do it for doc.type or vendor.
    In particular, setting for document type, it doesn't work for all range of vendors.
    Setting for document type, in the field "PartF" I've put in "OA". Could it depend on it?
    Thanks
    Gandalf

    Hi,
    Please select VN and check
    Select Key combination as document type and co code
    regards
    suresh

  • Change number of copies in preamble?

    Hi,
    I am a relative novice with Jetform, I use it occasionaly to make minor modifications to our forms but for the most part the standard prepackaged forms our vendor provides us do the trick.  We have run into a new issue that I was looking for some guidance on.  We print a shipping label for some of the goods we sell to our customers, this shipping label needs to go on each package the goods are shipped in.  Example,  a customer purchases 100 widgets, we ship them 10 each in 10 different boxes requiring 10 labels with a quantity of 10 printed on each.  Unfortunatly the customer needs to buy the item by the each so our erp application will tell jetform to print 100 labels and there is no way to modify this without expensive custom programming.  What I can do is add the pkg qty to the datastream to print on the label, this is easy enough but that still leaves me with 100 labels each with a qty of 10 printed.  Would it be possible to divide the package qty by the number of copies sent from the application in the preamble of the form and make that the new number of copies or is it already to late by the time the dat file is accepted by the output server?  Thanks in advance for any advice, this is killing us ! thousand of labels end up in the trash every day.
    Thanks ! Aseidas

    Does anyone have any advice input?  Things are getting desperate, Thanks !!

  • Get number of copies from print dialog

    Hi All,
    I am using javax.print API to display the print dialog, I am also able to successfuly print a document.
    My questions is how can get number of copies from the print dialog.
    I did log of googling, but no sucess...I have been trying from 1 day.
    Please help me.
    Thanks in advance.

    Here is the code:     // TODO Auto-generated constructor stub
              PrintService[] services = PrintServiceLookup.lookupPrintServices(null, null);
              PrintService defaultPrinter = PrintServiceLookup.lookupDefaultPrintService();
              PrintRequestAttributeSet attrs = new HashPrintRequestAttributeSet();          
              selection = ServiceUI.printDialog(
                 null, 100, 100, services, defaultPrinter, null, attrs);           
              if(selection!=null){
                   selectedPrinter = selection.getName();               
              }Now once the printDialog is displayed i want to get the number of copies selected by the user. I tried all different options from Attribute, but not successful.
    Please help...
    Thanks.

  • Crystal Reports Number of copies

    Hi there
    We are using Crystal reports to do reporting work in our add ons.
    Does anyony know if number of copies can be set  internally in a crystal report itself? We want to make the number of copies depending on a formula/function build withing a crystal report.
    We know it is possible to set number of copies from outside by setting a property at crystal report object but from inside ...?
    Thanks for your help
    Kurt

    Hi Kurt,
    As we haven´t found any "easy" way, we usually do a simple trick for this, but is dependent on the way we manage the Crystal Report.
    All our reports are based on views with parameters. So if we need 2 copies of a reports, what we do is to change the view. Instead of a SELECT statements we put the SELECT statement, UNION the same SELECT statement.
    This returns 2 results, and we manage them in the Crystal Reports.
    Hope helps,
    Ibai Peñ

  • Number of Copies is always 6

    Hi I have a G4 iBook and printing works fine except for the fact that in the print dialogue under number of copies the default value every time is 6 copies...I have to change it each time I print...was wondering if anyone had any idea how to get it back to being 1.
    iBook   Mac OS X (10.4)  

    Thanks, by doing what you recomended I noticed that my printing was set to use a different preset than the standard one and it was in this other preset that the 6 page thing was set. I deleted the offending preset and was left with only the Standard one which defaults to 1 copy per print.

  • Regarding Smart Forms(Number of copies)

    Hi Experts,
    I need to know the system field for holding the number of copies in smart forms, because i need to print the sequential number in the header window depends on the user's input(User will give the input no. of copies dynamically). Please advice me

    Hi
    The number of copies of an output is populated in the field NAST-ANZAL. The masterdata for the number of copies is maintained in NACH-ANZAL for any sales related transaction. The table NAST is however applicable irrespective of application.
    You can pass on your data to this field (NASST-ANZAL) for your reqmt.
    Reward if this helps.
    Message was edited by:
            Navaneetha Krishnan

Maybe you are looking for

  • Create PDF from data in database

    Hi together, I want to create a PDF file during a database trigger execution and want to save the result in a BLOB column. I have no idea what to do. Can someone give me a hint what to use to create the PDF? Thanks for help

  • Help needed with this scenario

    Hi, This is a scenario to be implemented using workflows. Can you tell me how to go about with this. there is a form on the portal. User enters some details there. Then there is a submit button. when the user presses the submit button, a workflow is

  • Filter for Camera Raw in Photoshop cs6?

    Bonjour, J'ai un petit problème avec nom photoshop CS6.  Je me suis rendu compte que dansl la galerie des filtres, il me manque celui de "filtre pour caméra raw" Nous savons tous que dans la fenêtre des flitres il y a: Galerie des flitres, grand angl

  • What is included in a single app CC subscription?

    Adobe has decent information about what is included in a full subscription but I'm having diffuculty finding exactly what is included (or excluded) in a single app (e.g. PS CC) plan. I see this: 20GB of cloud storage for file sharing and collaboratio

  • Accidentally made website text display smaller, how do I undo it?

    In both Safari and Firefox, when visiting a couple of websites, I accidentally hit some combination of keys and made the text display very small - it only seems to affect those two websites. I think it MIGHT have been when I was trying to do a long h