How to print custom documents through custom program

Hi,
I am printing custom documents like Commercial Invoice, Shipper's Letter of Instructions,  Shipper's Export Declaration , using communication tab of custom declarations. SInce user wanted output with a changed layout( different from standard), so new Activity messages ( like ZP100 in place of standard P100) are created to call Z forms ( new PDF from created using SFP and called for this Message type). This part is done our fucntional team. This customize message type is calling my custom Z forms. But all these Z forms are not allowing printing of the document from Preview of PDF. Print Icon become disabled in the preview. Used wants to print from preview of PDF itself.
There is a parameter in BADI  DOC_PERSONALIZE_BCS method parameter 'NOPRINT', which is passed with value 'X' in the function module to create PDF. SInce this is set to 'X' it is not letting us print from preview.
So, can anyone help me in finding what can I do to get this print enabled from preview. If I need to change this method, then what are the steps and how standard configurations will be changed to call Zprogram in place of standard.

Hi Swati,
The Badi you mentioned should help you, try changing the importing parameter in your local structure and pass this local variable, instead of the imported (IS_outputparams-noprint = 'X' ) to the function below. This is an example, you`ll need to declare data as well :
Method IF_EX_DOC_PERSONALIZE_BCS~PERSONALIZE_PDF_DOC_PDFIF
ls_output_options = is_outputparams.
  IF NOT ls_output_options-preview IS INITIAL.
    ls_output_options-noprint = ' ' .    " Allow printing
   ENDIF.
call function '/SAPSLL/PRN_FORM_PROCESS_PDF'
    exporting
      iv_guid_cuhd       = lv_guid_cuhd
      iv_function_name   = ip_function_name
      iv_form_name       = ip_form_name
      iv_appl_log_handle = ip_application_log
      is_output_options  = ls_outputparams " put your LOCAL structure here ....
    importing
      es_formoutput      = es_formoutput
      es_joboutput       = es_joboutput
    changing
      cs_docparams       = cs_docparams
    exceptions
      output_canceled    = 1
      others             = 2.
Hope this helps,
Regards,
Branislav Petricek

Similar Messages

  • Customs documents and customs declaration.

    Hi Experts,
    Can any one please briefly explain what is the difference between customs document and customs declaration. Is there any special process required to convert customs document as customs declaration?
    I will explain by taking one scenario.
    If we transfer any documents from ecc to gts those documents will called as customs documents. Please tell me am I Right or wrong if right,
    another scenario,
    when we send proforma invoice to gts those invoice will be converted as customs declaration. Is it right or wrong if it is right how it converts to customs declaration why cann't it convert as customs document.
    for converting customs document to as customs declaration is there require any process or configuration settings if yes please let me explain i am little bit confuse.
    Thanks in advance for help ful answer.

    Hi Hari,
    You are exactly bang on in explaining about what is a Customs document and What is a Customs declaration.
    Firstly, please take a look at the below thread where this had been discussed earlier also.
    Difference between customs document and customs declaration document
    But to further differentiate in real sense,
    A Custom document is something that is record in the SAP GTS system of the trade transactions occurring in the SAP logistics system and some time may a supporting document as well. An example of such a case is when we create a sales order , then a customs document is being generated in the GTS system. Here, SAP GTS Custom Documents are just a replica of the SAP feeder system's documents like Sales order etc. with Trade specific data like licenses embedded into them to further assist for future declarations and tracking.
    A Custom Declaration is something that contains data to be declared to the appropriate authorities in the specified format.  During this process ,data from the company's SAP business documents is copied into a declaration to further pass on to the authorities for approval for trade and related processes.
    I hope that now the things will be clear to you. If not, please open a discussion thread for an open discussion to get the required stuff.
    Regards,
    Aman

  • How to print material document in header level?

    Hi Guys,
    How to print material document from header level. I can only print them in item level. But i want that in header level. For example, I have 4 movements inside a material document and I want to issue only one output from the header level.
    I can see the option Goto -> Additional Function -> output, but it is disabled. Please let me know hot to acheive this and if you need further info on this. Please throw some light on this.
    Thanks
    Yasin.

    HIi
      Your question is not clear.  What exactly you want to be.
    1.  To print material header in your smart form / Sap Script what is the problem. Itu2019s quite easy you can do it. Let me know what problem you are facing.
    2. The option is disables because of business functionality ask your functional guys to help you on the same.
    Regards
    Swati

  • How to print a document in Pages

    just got iMac computer and downloaded Pages.  Can not work out how to print a document I just created

    Hi LL,
    There's a great piece of free documentation for Pages called the Pages User Guide. It can be downloaded from the Help menu. I suggest that you read the well-written guide some quiet evening. It will get you off and running with your new computer and Pages.
    Printing documents on a Mac is the same as on a Windows system: File > Print.
    Jerry

  • How to change system time through java program

    Hi
    I want to know, how to change system time through java program.
    give me a idia with example.
    Thanks

    There isn't any core Java API for this. Use JNI or call an external process with Runtime.exec().
    ~

  • How to print PDF documents on Unix(Solaris)

    Hi ,
    I wanted to know how to print PDF documents on Unix(Solaris)?
    Is there a document or white paper that i can refer to start printing PDF document.
    What kind of drivers/utilities will be required to achieve the objective?
    Kiran

    Have you tried FOXIT? I think there is a trialversion. I tried Adobereader 2.5 but there is still no option to print.
    ‡Thank you for hitting the Blue/Green Star button‡
    N8-00 RM 596 V:111.030.0609; E71-1(05) RM 346 V: 500.21.009

  • PLD: How to print 1 document to 2 printers

    Dear All,
    Can someone tell me how to print 1 document to 2 different printers? I need this for my delivery documents. 1 copy goes to 1 printer with normal A4 paper (return with signature copy) and the other needs to go the the other printer which has pre-printer paper with a logo and different color paper (for client to keep copy).
    Can this be done with normal functionality or does this require an add-on?
    Thanks!

    Hi,
    This can be done using a UDF.
    If Value of UDF is 1 then all the field related to the Deliver document has to Print
    If Value of UDF is 2 then all the field related to the Pre-printed format has to print
    This can be done by changing the UDF whenever your are taking the print out you have to select the UDF so that they can take the Delivery Document and Pre-printed document by using Formula field in the Single Print Layout.
    But you have to customize the report according to that.      I Had done the same for my client.
    Once the Problem is solved please close this issue.
    Regards
    Chidambaram

  • How to print a documents

    po

    Hi,
    Firstly what is your document and what is your printer ? Where do you print from ? Nearly all applications have a Print function and when we click Print, the document will print to the default printer. BUT that's very general. We need more information before we can answer the questtion "How to print a document".
    Regards.
    BH
    **Click the KUDOS thumb up on the left to say 'Thanks'**
    Make it easier for other people to find solutions by marking a Reply 'Accept as Solution' if it solves your problem.

  • POSTING G/L account documents through custom program

    While posting the documents through the tcode fb01,
    when I tick at PA segement button ASSIGNMENT TO
    PROFITABILITY SEGMENT screen opens, DERIVATION
    BUTTON is activated/enabled . But through a custom program when session is
    processed and when PA segement button is ticked on
    ASSIGNMENT TO PROFITABILITY SEGMENT screen, DERIVATION BUTTON is not visible. I can only see Continue, Next Page, Delete Assignment, and Cancel buttons. Where do I need to check this problem?

    Hi,
    Nope, in standard SAP you can not do that.
    You would need to develop your custom program for it.
    Regards,
    SDNer

  • B2B  Custom document through Http Channel.

    Hi
    Normally in order to exchange Edifact documetns we use Edi identifiers to receive documents from multiple Trading Partners.
    But we have a scenario, where we need to use single Custom Purchase Order document definition and need to recieve Documents from multiple Trading Partners through Http Channel, we are passing xml documents. How to get Document Identifier for Custom documents and how to get the Identifier tag from the Document given as input to differentiate from different trading partners.
    Thanks in advance.
    Regards
    Chaitanya.

    Hi Anuj,
    Thanks for reply
    In My scenario i have to receive custom documents(cXML file) from two remote trading partners through http channel. I just created one custom document definition...and each agreement for each trading partner using that document definition.
    If the document (i/p) is coming from soa, then easily i can give fromTP and toTP values in SOA mediator or bpel and i can route the document to particular agreement.
    But in my case,the i/p document doesnt comes from SOA (it may come from http servlet or in some way) so i cant give toTP and fromTP values.
    so if it is a EDI document ,then we can route it according to the identifiers. but in my case it is a Custom document i.e, cXML.xml
    so in my xml i had one <Identity>xxx</Identity> tag ,this identity tag value tells us from which partner the document is coming. so by using this identity tag can i route it to particular agreement.
    so based on the above identity tag, how can i find the trading partner in b2b.
    Thanks in advance,
    Regards,
    Chaitanya.

  • How to print the page in custom format

    Hi All,
    I've a login page like
    USER ID : Test box to enter data
    PASSWORD: Text Box to enter data
    A Button named as Print
    When i click on print button i want to print the form in custom format. when i use window.print in java script it is printing text boxes and button . but i dont want to print button and text boxes. i just want to print the user id and password entered by the user with corresponding labels.
    Can anyone suggest me how to print the page in the above format with out using the request object. coz i need to implemnt above with plain java script and html.
    Tks in Advance

    Use CSS. Check out the 'media' attribute. http://www.w3.org/TR/REC-CSS2/media.html

  • PLD - How to print 'Offic Copy' or 'Customer Copy' on Docuemnts

    While printing various Marketing documents,  I need to print a messge saying 'Office Copy' on the 1st copy of the Marketing document and 'Customer Copy' on the second copy of the Marketing document,  Is it possible to do this using the PLD??
    Thanks!!
    Dana

    Dana,
    The solution I am suggesting is my approach to your scenario.
    Create a User defined field in the Marketing Documents ..Title level by going to Manage User Fields window, choose Tools  > User-Defined Fields > Manage User Fields.
    It can be an alphanumic field.. Check Set Valid Values for Field and define
    Office Copy
    Customer Copy
    Map this field into your PLD template and print.
    Alternate Approach.
    Is to use the Printed field in the ORDR table to check if the copy of the first copy or Second Copy. 
    SAP Stored 'Y' on 'N' in this field and the same is available in the PLD .
    In the PLD of the marketing document.. Page Header area
    Add a Database field from ORDR - Sales Order...Field: Printed
    Add a formula field and in the Contents Tab of the Field properties window .. Add formula to Check the Value of the Database Field you Added (Printed) = "Original"
    Example: Field_203 == "Original"  (suppose field_203 is the printed field you added)
    Add another formula field referring to the same printed field (Field_203 == "Copy")
    Add two Text Fields with Text "Office Copy"  and "Customer Copy"
    The the Office Copy text field, add the first formula field (Field_203 == "Original") as the link field and similarly the second formula field to the "Customer Copy" text field.
    This way when you print the First time, the marketing document would evaulate the Printed field and Print Office Copy and the Second time onwards it will print customer Copy.
    Good luck
    Suda

  • Parking Document  Through ABAP Program

    Dear Experts,
    I need to Park the Account Documents Using ABAP program,
    Please Suggest Any FM or Any Example.
    please suggest how to use RFBIBL00 program in my abap program. or if any other better way to post document using custom program.
    Sincerely

    Answered through sdn forums.

  • How to print color document in greyscale without it being really dark?

    Recently had a customer come in and want some holiday letters printed out. They had a bunch of color photos in the document and when we printed that from Adobe Acrobat to our black and white copier, they came up REALLY black. Everything was much darker that it should have been.
    Normally we work around this issue by placing the document into InDesign and printing it in Greyscale mode from there since you can tell it RGB, CMYK or Greyscale from InDesign. Problem is, if I wasn't here, nobody else would know how to do this and they would probably have to turn the customer away.
    Our counter machine is a WindowsXP machine with the newest version of Acrobat Reader. I saw this link elsewhere here:
    http://forums.adobe.com/thread/948555?tstart=0
    But that doesn't work. When clicking on Advanced button in the print window for Acrobat Reader, the Advanced window doesn't have anything about printing in greyscale. The copier is a Canon iR 7095.
    Any thoughts on what we can do? Basically, I want to be able to have the ladies that work the counter (and the counter PC) to be able to print color documents to the black and white machine without having a problem with the output and having to either come into my office and have me help with it, or having to turn the customer away.
    Any thoughts?

    go to Files --> Add Files to Upload

  • Correspondence types (transaction FB12): How to print a document?

    Hi,
    I am using transaction FB12 to test correspondence type "account statement" in quality.
    When I enter the correspondence type, customer number  posting dates, it get the message that the account statement was requested.
    When I go to the spool (SP01), I cannot find it.
    What do I need to do to see/print the account statement?
    Thank you for your support.
    Kind regards,
    Linda

    T-code  FB12,    F.64
    Accounting/ Financial Accounting/ Accounts Receivable/ Account/Correspondence/Request fb12
    Accounting/ Financial Accounting/ Accounts Receivable/ Account/Correspondence/Maintain -f.64
    Note:  Prior to executing this test, ensure that you have updated the print program variants  to print to a test printer
    Input the following:
    1) Correspondence : Corrrespondence type (the same correspondence type you used when you requested correspondence)
    2) Enter company code
    3) Enter Document Number
    4) Hit Execute
    Double click on the line item you wanted to print.
    Using steps 1-3, create and print a Customer Invoice & Debit Memo.
    Check the Customer Address printed below the 'Remit To' address in the Debit Memo.& Original Invoice
    Menu Path:
    Accounting>Financial Accounting>Accounts Receivable>Periodic Processing>Print Correspondence>Periodic Account Statement
    OR enter Transaction code: F.27
    Fill in the following values:
    1) Company Code
    2) Account type = D (for customer)
    3) Account = Customer account number.  Enter the range of customer accounts ((Note:  Customers with no open items will not be printed.
    Canadian customers will get a dual language ( English/French ) Statement and all others will get an English Statement.)
    4) Indicator in master record:  2 - for monthly. The indicator here has to match the indicator set up in the customer master record.
    5) Key dates for acct statement = This is an open item statement.  Enter the starting date as always 01/01/1990 adn the ending date should be the last day of every month.
    6) Correspondence:
    7) Delete if finished = defaults to 8. Do not leave blank. If you leave blank the completed correspondence requested aren't deleted.
    8) Log to printer = Provide the name of the output device in the SAP system. 
    Hit Execute
    To view details in the spooler and status of the printing process or if the previous two steps do not produce a printed account statement,  use
    1) Transaction code: SP01
        Click Execute.
    2) Select the spool number (this is displayed in the Periodic Account Statements Log produced in step 2) you wanted to print by entering it. Click Print directly (the printer icon beside the refresh button)
    T-code F.61
    Select the following path
    Accounting/ Financial Accounting / Accounts Receivable / Periodic Processing/Print Correspondence/As Per Request
    Input the correspondence type you want to print and company code.  Execute

Maybe you are looking for