More than one print program for one sap script

Hi Experts,
I have more than one print program which is attached to one sap script. There is standard text used in the script which has variable as date, i want that date to be converted into the previous date but only for one specific print program. For rest of the print program it should behave as it is.
I have tried it using ( s_date - 1 ) formula and it is working fine. But the variable s_date is used in other parts of the program which is affecting rest of the functionality when i am using above said formula. I can't use other variable in standard text as it is used by other programs.
Please guide me to resolve this, thanks in advance.

Well, I'm not sure if I understand the scenario 100%, but I think what you have is a standard text (that you cannot change) referring to variable &S_DATE&. You want this to display the previous day's date when the form is used by one print program but not when it's called by another.
Also, you don't want to change S_DATE to S_DATE - 1 for the whole printout, because apart from the text display, S_DATE is used elsewhere and you want to keep the date as S_DATE, not the previous day.
I assume that you can change the coding of the form.
If all of the above is correct, then you could change the value for S_DATE in the form to the previous day just before it calls the standard text and change it back after the output of the text is done. So right befor the INCLUDE for the standard text, you could use an IF statement in the form logic, query the value of SY-REPID (or SY-CPROG). You'll have to test which one shows the print program name. Depending on that, you can do S_DATE = S_DATE - 1 and after the INCLUDE, do the same thing and change it back to S_DATE = S_DATE + 1.
But honestly, this is a pretty shady programming technique... I mean, hard coding references to the print program name in the form logic is certainly not a very clean method

Similar Messages

  • How to find the print program for a sap script

    Hey Experts,
    How to find the print program for a sap script (espicially when it is a custom script(Z*))?
    Thanks a ton,

    Thanx Vijay,
    Actually when I searched for the program in both the tables it didnt show up ther.
    But when I did check in the texts of script, I found it.
    Good job.
    Thanks all.
    Vijay, a small doubt.
    But why didn't it show up in those 2 tables when all the print programs for standard scripts show up usually?
    thnx once again.
    Message was edited by: dev a

  • How to find standard print programs for ADOBE forms

    Hi All,
    My question is how to find the standard SAP print program for a SAP provided ADOBE form. For example - how to find what is the satndard SAP provided print program for the ADOBE form for payment advice 'F110_AVIS_INT'.
    As by default in the transaction F110 (where the payment advice form configuration is done), a SAP Script form is attached and the print program assigned is an SAP Script (as it contains call to function module like open_form, write_form... ) program and not an ADOBE print program.

    Hi Renu,
    I have gone through the link provided by you but it only shows a list of standard PDF forms.
    My question was how to find the standard SAP provided print program (or driver program which contains the data fetch logic and passing of the data to the interface of the ADOBE form) for these SAP provided ADOBE form.
    If SAP has provided standard ADOBE form then definitely they would also have provided the standard print program too ?
    @Srihari,
    The path system --> Status --> program SAPLFPUIFB is the standard program for the SFP transaction and not for the payment advice form F110_AVIS_INT.
    It will be same for all the ADOBE forms if we check in System --> Status --> Program.

  • One Print program can call moe than one layOut

    HI all.
    In SAP-Scripts ,,One Print program can call moe than one layOut ?
    Thanks in advance
    Sri...

    Yes you can call more than one SAPScript and Smartforms from your one print program.
    For SAPScript, you need to use the OPEN_FORM or the START_FORM for each new FORM.
    For SMARTFOrms, you need to call those Smartform's FM in a sequence.
    Regards,
    Naimesh Patel

  • Need an approach regarding reporting for a one-to-many primary-child relationship, where there are more than three child objects for a primary object for reporting purpose

    Business Scenario- We have a parent organization with 6 different Business Units.One BU requires 9 stages for for Opportunity(Tender) Tracking.The client requirement is to show the basic details of the tender at the header level and to show details specific to individual sales stage as different tabs.There will be multiple opportunity members added as opportunity team and will be responsible for capturing details specific to individual sales stage(tab). The Tab should be enabled and disabled based on the role. Reporting is required against each stage with specific fields of child objects against each opportunity.
    We created multiple children entities under the oportunity(one to many mapping) but we are unable to add more than 3 child objects for a primary object for reporting purpose.
    Kindly suggest what needs to be done to meet the requirement

    Can you provide the exact steps you took to  "created multiple children entities under the oportunity" ?
    Jani Rautiainen
    Fusion Applications Developer Relations
    https://blogs.oracle.com/fadevrel/

  • One mapping program for three diferent enviroments

    Hello there,
    I have developed a scenario in which an rfc requests a web service trough XI. In the process a BPM is involved together with some XSLT mappings.
         R3->XI->WebService
    The Web service request message looks like follows:
    <?xml version="1.0" encoding="UTF-8"?>
    <cem:Z_ORDER_SEARCH xmlns:cem="http://XXXXXXXX/yyyyyyyyyyyy">
         <messageStructure/>
    </cem:Z_ORDER_SEARCH>
    Where "http://XXXXXXXX/yyyyyyyyyyyy" Is the web service destination.
    Everything works fine, but as I have to manage three different environments for Development, Quality and Production I need three different versions of the XSL mapping since destinations are not the same for Dev, Qlty and Production environments.
    I found out that I can get information of the sender using runtime parameters as follows:
    <xsl:param name="SenderSystem">
    I would like to evaluate this information to determine the target URL destination.
    If the sender is the development sender then the URL target is the development destination and so on.
    I tried the following code:
    <?xml version="1.0" encoding="UTF-8"?>
    <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:fo="http://www.w3.org/1999/XSL/Format"
    xmlns:cemDev="http://developmentDestination"
    xmlns:cemQlty="http://qualityDestination"
    xmlns:cemPrd="http://productionDestination"
    xmlns:cem=""
    <xsl:namespace-alias stylesheet-prefix="cem" result-prefix="cemDev"/>
    <xsl:template match="/">
         <cem:mappingProgram/>
    </xsl:template>
    </xsl:stylesheet>
    This works all right, but I cannot insert code to evaluate the destination.
    On the other hand, this code is not valid:
    <?xml version="1.0" encoding="UTF-8"?>
    <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:fo="http://www.w3.org/1999/XSL/Format"
    xmlns:cemDev="http://developmentDestination"
    xmlns:cemQlty="http://qualityDestination"
    xmlns:cemPrd="http://productionDestination"
    xmlns:cem="">
    <xsl:param name="SenderSystem"/>
         <xsl:choose>
              <xsl:when test="string($SenderSystem) = 'PRODUCTION'">
                   <xsl:namespace-alias stylesheet-prefix="cem" result-prefix="cemPrd"/>
              </xsl:when>
              <xsl:when test="string($SenderSystem) = 'QUALITY'">
                   <xsl:namespace-alias stylesheet-prefix="cem" result-prefix="cemQlty"/>
              </xsl:when>
              <xsl:otherwise>
                   <xsl:namespace-alias stylesheet-prefix="cem" result-prefix="cemDev"/>
              </xsl:otherwise>
         </xsl:choose>
         <xsl:template match="/">
              <cem:mappingProgram/>
         </xsl:template>
    </xsl:stylesheet>
    Neither this one:
    <?xml version="1.0" encoding="UTF-8"?>
    <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:fo="http://www.w3.org/1999/XSL/Format"
    xmlns:cemDev="http://developmentDestination"
    xmlns:cemQlty="http://qualityDestination"
    xmlns:cemPrd="http://productionDestination"
    xmlns:cem="">
            <xsl:param name="SenderSystem"/>
            <xsl:template match="/">
         <xsl:choose>
              <xsl:when test="string($SenderSystem) = 'PRODUCTION'">
                   <xsl:namespace-alias stylesheet-prefix="cem" result-prefix="cemPrd"/>
              </xsl:when>
              <xsl:when test="string($SenderSystem) = 'QUALITY'">
                   <xsl:namespace-alias stylesheet-prefix="cem" result-prefix="cemQlty"/>
              </xsl:when>
              <xsl:otherwise>
                   <xsl:namespace-alias stylesheet-prefix="cem" result-prefix="cemDev"/>
              </xsl:otherwise>
         </xsl:choose>
         <cem:mappingProgram/>
          </xsl:template>
    </xsl:stylesheet>
    I tried this other code, which is obviously not valid:
    <?xml version="1.0" encoding="UTF-8"?>
    <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
         <xsl:template match="/">
              <xsl:param name="SenderSystem"/>
              <xsl:choose>
                   <xsl:when test="string($SenderSystem) = 'PRODUCTION'">
                        <cem:Z_ORDER_SEARCH xmlns:cem="http://productionDestination">
                   </xsl:when>
                   <xsl:when test="string($SenderSystem) = 'QUALITY'">
                        <cem:Z_ORDER_SEARCH xmlns:cem="http://qualityDestination">
                   </xsl:when>
                   <xsl:otherwise>
                        <cem:Z_ORDER_SEARCH xmlns:cem="http://developmentDestination">
                   </xsl:otherwise>
              </xsl:choose>
         <cem:mappingProgram/>
    </cem:Z_ORDER_SEARCH>               
         </xsl:template>
    </xsl:stylesheet>
    So the only way I found to make it works is like this:
    <?xml version="1.0" encoding="UTF-8"?>
    <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
         <xsl:template match="/">
              <xsl:param name="SenderSystem"/>
              <xsl:choose>
                   <xsl:when test="string($SenderSystem) = 'PRODUCTION'">
                        <cem:Z_ORDER_SEARCH xmlns:cem="http://productionDestination">
         <cem:mappingProgram/>
                        </cem:Z_ORDER_SEARCH>
                   </xsl:when>
                   <xsl:when test="string($SenderSystem) = 'QUALITY'">
                        <cem:Z_ORDER_SEARCH xmlns:cem="http://qualityDestination">
         <cem:mappingProgram/>
                        </cem:Z_ORDER_SEARCH>
                   </xsl:when>
                   <xsl:otherwise>
                        <cem:Z_ORDER_SEARCH xmlns:cem="http://developmentDestination">
         <cem:mappingProgram/>
                        </cem:Z_ORDER_SEARCH>               
                   </xsl:otherwise>
              </xsl:choose>
         </xsl:template>
    </xsl:stylesheet>
    Unfortunately this doesn’t solve my problem, because I need to reproduce the mapping program three times in the document.
    Any ideas, or suggestions how to manage one mapping program for the three different environments?
    Thanks a lot in advance, Raú

    Hi there,
    I just found one way of getting this done. It may not be the better waw, but I post it in case it is helpfull.
    <?xml version="1.0" encoding="utf-8"?>
    <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:fo="http://www.w3.org/1999/XSL/Format">
         <!-- Sender System at runtime-->
         <xsl:param name="senderSystem"/>
         <!-- SenderSystem constants (development addressed by default)-->
         <xsl:variable name="qualitySenderSystem" select="'WHATEVERTHENAMEOFTHEQUALITYSENDERSYSTEM'"/>
         <xsl:variable name="productionSenderSystem" select="'WHATEVERTHENAMEOFTHEPRODUCTIONSENDERSYSTEM'"/>
         <!-- Mapping program template to be called-->
         <xsl:template name="mappingProgram" match="/">
              <!-- MAPPING PROGRAM-->
              <UNIQUE_MAPPING_PROGRAM/>
              <!-- END OF MAPPING PROGRAM-->
         </xsl:template>
         <!Receiver determination depending on senderSystem>
         <xsl:template match="/">
              <xsl:choose>
                   <xsl:when test="$senderSystem=$productionSenderSystem">
                        <xxx:Z_ORDER_SEARCH xmlns:xxx="http://production">
                             <xsl:call-template name="mappingProgram"/>
                        </xxx:Z_ORDER_SEARCH>
                   </xsl:when>
                   <xsl:when test="$senderSystem=$qualitySenderSystem">
                        <xxx:Z_ORDER_SEARCH xmlns:xxx="http://quality">
                             <xsl:call-template name="mappingProgram"/>
                        </xxx:Z_ORDER_SEARCH>
                   </xsl:when>
                   <xsl:otherwise>
                        <xxx:Z_ORDER_SEARCH xmlns:xxx="http://development">
                             <xsl:call-template name="mappingProgram"/>
                        </xxx:Z_ORDER_SEARCH>
                   </xsl:otherwise>
              </xsl:choose>
         </xsl:template>
    </xsl:stylesheet>

  • How to know print program for SAP Script

    Hi friends,
    how to know print program for SAP Script form name ?

    Hi ,
      You can use the following code changes in the layout & see..
    You have to create a program Z_BC460_EX4_HF for that..
    /:PERFORM GET_NAME IN PROGRAM Z_BC460_EX4_HF
    /:  USING &CUST&
    /:  CHANGING &NAME&
    /:ENDPERFORM.
    Dear &NAME&
    The ABAP routine could be defined as follows:
    IMPORTANT: The structure itcsy must be used for the parameters.
    REPORT Z_HENRIKF_SCRIPT_FORM .
      tables scustom.
      form get_name tables in_tab structure itcsy
                           out_tab structure itcsy.
      read table in_tab index 1.
      select single * from scustom
        where id = in_tab-value.
      if sy-subrc = 0.
        read table out_tab index 1.
        move scustom-name to out_tab-value.
        modify out_tab index sy-tabix.
      else.
        read table out_tab index 1.
        move 'No name' to out_tab-value.
        modify out_tab index sy-tabix.
      endif.
    You could also fill the ouput parameter table this way
       READ TABLE out_par WITH KEY 'NAME1'.
       out_par-value = l_name1.
       MODIFY out_par INDEX sy-tabix.
    endform.

  • More contracts (with different suppliers) for one item

    Dear MDM Experts,
    is it possible to make more contracts (with different suppliers) for one item?
    Thanks and regards,
    Ádá

    Hi,
    Thanks for your answer. If I set my shopping cart for a contract with a supplier A, and I select an item with a supplier B, then after pushing button Transport to SRM on the shopping cart webdynpro UI, I would get the an error message, and the item wouldn't come to the SRM.
    If the item doesn't have any supplier, and I make a contract with it, the supplier of the contract goes to the item, and after that I can't make a contract with an other supplier for this item, because of the uppers.
    The type of field Supplier in table Catalog Items is Lookup field, and it can't be modified.
    Could you please write to me which can I set our system to be able to make contracts with many suppliers?
    Thanks and regards,
    Ádám Horváth

  • How to write print program for smartforms

    Hi all
    I need to develop new smartform and its print program.
    But Im not experience in writing print program for smartform.
    Ive gone through the simple print program sample that use only one table as input and one table for output.
    But my smartforms require few tables for input and output.
    How should I define the Data?
    Can anyone guide me on how to write it.
    Thanks & Regards
    az

    Transaction code SMARTFORMS
    Create new smartforms call ZSMART
    2. Define looping process for internal table
    Pages and windows
    First Page -> Header Window (Cursor at First Page then click Edit -> Node -> Create)
    Here, you can specify your title and page numbering
    &SFSY-PAGE& (Page 1) of &SFSY-FORMPAGES(Z4.0)& (Total Page)
    Main windows -> TABLE -> DATA
    In the Loop section, tick Internal table and fill in
    ITAB1 (table in ABAP SMARTFORM calling function) INTO ITAB2
    3. Define table in smartforms
    Global settings :
    Form interface
    Variable name Type assignment Reference type
    ITAB1 TYPE Table Structure
    Global definitions
    Variable name Type assignment Reference type
    ITAB2 TYPE Table Structure
    4. To display the data in the form
    Make used of the Table Painter and declare the Line Type in Tabstrips Table
    e.g. HD_GEN for printing header details,
    IT_GEN for printing data details.
    You have to specify the Line Type in your Text elements in the Tabstrips Output options.
    Tick the New Line and specify the Line Type for outputting the data.
    Declare your output fields in Text elements
    Tabstrips - Output Options
    For different fonts use this Style : IDWTCERTSTYLE
    For Quantity or Amout you can used this variable &GS_ITAB-AMOUNT(12.2)&
    5. Calling SMARTFORMS from your ABAP program
    REPORT ZSMARTFORM.
    Calling SMARTFORMS from your ABAP program.
    Collecting all the table data in your program, and pass once to SMARTFORMS
    SMARTFORMS
    Declare your table type in :-
    Global Settings -> Form Interface
    Global Definintions -> Global Data
    Main Window -> Table -> DATA
    Written by : SAP Hints and Tips on Configuration and ABAP/4 Programming
    http://sapr3.tripod.com
    TABLES: MKPF.
    DATA: FM_NAME TYPE RS38L_FNAM.
    DATA: BEGIN OF INT_MKPF OCCURS 0.
    INCLUDE STRUCTURE MKPF.
    DATA: END OF INT_MKPF.
    SELECT-OPTIONS S_MBLNR FOR MKPF-MBLNR MEMORY ID 001.
    SELECT * FROM MKPF WHERE MBLNR IN S_MBLNR.
    MOVE-CORRESPONDING MKPF TO INT_MKPF.
    APPEND INT_MKPF.
    ENDSELECT.
    At the end of your program.
    Passing data to SMARTFORMS
    call function 'SSF_FUNCTION_MODULE_NAME'
    exporting
    formname = 'ZSMARTFORM'
    VARIANT = ' '
    DIRECT_CALL = ' '
    IMPORTING
    FM_NAME = FM_NAME
    EXCEPTIONS
    NO_FORM = 1
    NO_FUNCTION_MODULE = 2
    OTHERS = 3.
    if sy-subrc 0.
    WRITE: / 'ERROR 1'.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
    WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
    endif.
    call function FM_NAME
    EXPORTING
    ARCHIVE_INDEX =
    ARCHIVE_INDEX_TAB =
    ARCHIVE_PARAMETERS =
    CONTROL_PARAMETERS =
    MAIL_APPL_OBJ =
    MAIL_RECIPIENT =
    MAIL_SENDER =
    OUTPUT_OPTIONS =
    USER_SETTINGS = 'X'
    IMPORTING
    DOCUMENT_OUTPUT_INFO =
    JOB_OUTPUT_INFO =
    JOB_OUTPUT_OPTIONS =
    TABLES
    GS_MKPF = INT_MKPF
    EXCEPTIONS
    FORMATTING_ERROR = 1
    INTERNAL_ERROR = 2
    SEND_ERROR = 3
    USER_CANCELED = 4
    OTHERS = 5.
    if sy-subrc 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
    WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
    Reward points...

  • Ho to find script and the related print program for print preview of PO

    Hi All,
    We are getting some text output on the print preview of a purchase order.
    How can we determine the driver script and the corresponding print program for this.
    Can you please guide on this.
    Thanks in advance.
    Regards,
    Sanjeet

    U Can check Driver program and form related to that program table is TNAPPR
    Goto NACE t.code
    Selct Application ---> click on output types
    then u wil get one window there select proper output type and
    double click on  processing  routines u wil get form name and related driver program name also
    Plz try this....
    Edited by: Upender Verma on Feb 9, 2009 1:33 PM
    Edited by: Upender Verma on Feb 9, 2009 1:37 PM

  • One Purchase Requisition for One Maintenance Order

    Dear Consultants,
    We have implemented mySAP ECC 6.0.   We have more than 20 line items in one Maintenance order for  Item category N. Curently system is generating Purchase requisitions by line itemwise for Item category N(Non-stock items). Our client requires only one purchase requisition for every Maintenance Order. Is it possible to generate one PR for one Maintenance Order? If possible please give us the solution.
    Thanks,
    Dev

    Dear Pete Atkin,
    With your help my issue has been resolved. Thank you very much.
    With Best Regards,
    Dev

  • Output Type or Print PRogram for Payment Advice

    Hi Folks,
    I have a requirement to develop a  script for Payment Advice...,except the layout nothing is given about it.Could anybody tell me the lrelated T.Code,Output type,Form name and Print program if one exists for the same.
    Thanks in advance.
    Regards,
    Ravindra<b></b><b></b><b></b><b></b>

    Hi,
    i assume you are doing it for US clients.
    if so then this is the form <b>F110_US_AVIS</b>
    and driver program is <b>RFFOUS_C</b>
    if you want for other countries then let me know.
    Regards
    vijay

  • Can we use more than 1 credit card for icloud family Sharing?

    Can we use more than 1 credit card for icloud family Sharing?
    We are grown up, with our own credit cards, own incomes, and own financial.
    But we would like to share apps, music, photos, books, vidéos etc.. like any other family.
    No one (even the parents) wants to pay for everyone's purchase.
    Other question: will it cancel all payment informations from family members account?

    not sure about pre-paid cards, but I know you can use 2 different credit cards though, I chatted with an apple rep last night, and she told me I can use 2 credit cards to buy something I wanted on the apple store website, so I acted as if I was buying a macbook air, went to checkout, and there was in fact the option of using 2 cards, which I thought was crazy since so many people have said that you can not use 2 cards. I'm glad I asked a rep

  • To find print program for smartforms.

    pls tell me how to find print programs for smartforms.pls tell me with all steps.clearly.i tried with tanpr table but unable to find

    hi,
    Please take a look at the NACE transaction where all the output conditions will be configured. Drill down into you specific application and you should be able to find the print program as well as the smart form name.
    Steps..
    Use NACE and follow procedure as follows
    1)Choose Application from list(eg PO)
    2)Click OP type
    3)Chose one OP type from Right pane.
    4)Click on processing routines
    and you got it
    regards,
    keerthi

  • Print program for delivery output printing

    Hi,
    I need help with creating a custom smart form and print program for outbound delivery.
    1. i want to know how to select data in my print program ? i mean how to i get the delivery number when the output type is executed.
    2. What parameters are to be passed so that delivery opens as soon as the output type is processed.
    Thank you.
    Usha

    Details of output triggered can be obtained from nast. By default structure nast is populated with the values when the print program is being processed. Field OBJKY is used for the delivery number; Application : V2
    It could be enough to pass an internal table with item level details and an header structure. This more or less is dependent on the output desired.
    Rgds,
    Karthik

Maybe you are looking for

  • How can you create an activity as subsequent act. of more than one activity

    Hi. I want to create an activity as subsequent activity of more than one activity. I am using FM CRMXIF_ORDER_SAVE, but if I write data structure CRMXIF_DOC_FLOW with more than one item the system shows the error CRM_COPY 010 More than one predecesso

  • Internal Hard Drive Not Appearing in Finder

    I just had to do a reboot of my Mac Pro as Final Cut Pro kept locking up and when the computer was back up, one of my Western Digital 2 TB internal hard drives is missing!  When I restart, I got a message saying something like the disc inserted canno

  • Deleted files still showing/opening in MS Excel

    Hi I have 6 files in MS excel that were deleted from my docs in finder and I did secure empty of the trash.  However, the files still appear and can be opened in excel. I tried searching for them by file name but can't seem to locate where excel is h

  • Open to the first page in a document

    Adobe Acrobat, reader and creator, both default to open a multiple page document, showing the page that was highlighted at the time that the document was saved. As a result, the next document viewer will see a page somewhere in the middle of the docu

  • Content Error

    What's this error mean? Unable to retrieve the latest revision. The result set 'DOC_INFO' was not found or is empty. An error has occurred. The stack trace below shows more information. (Windows; U; Windows NT 5.0; en-US; rv:1.9.2.3) Gecko/20100401 F