Creating sapscript from a standard sapscript - need suggestions

Hi,
I am currently working on a settlement form.
There is a standard invoice settlement with the following details:
- SAPscript - MR_PRINT
- Program - RM08NAST
- Entry Routine - ENTRY_KONS
My task is to create a new SAPscript, which will have a different look. However, the new SAPscript will be 90% composed of existing standard data, with the other 10% composed of several new fields.
At 1st, I thought of just copying the entire standard print-program.
However, the entry point ENTRY_KONS calls an FM that does all the data selection. This FM has tons of includes inside.
What is generally done, especially in regards to output type KONS? what do I do?
Do I copy every include or create my own program and copy only what I need?
Please help.
Thanks,
John

Hi,
     If additional fields are few and any relationship with the existing data.
     Copy Standard sapscript and use original print program.
     You try using Subroutines, You can get the data for the additional fields and other calculations in the   subroutines and pass the data to the sapscript.
      First identify from which tables the additional fields reside and any relation with the existing data in the
sapscript which can be used as USING parameter in PERFORM statement.
      Call the subroutine, fetch the data and do additional calculations and send data back to sapscript.
Refer the SAP help link on PERFORM statement
http://help.sap.com/saphelp_40b/helpdata/en/d1/803279454211d189710000e8322d00/content.htm
you can find many threads on PERFORM in SAPSCRIPTS, do a search in SCN for additional help on that statement.
Regards
Bala Krishna

Similar Messages

  • Query not working while creating Sales Order... Need suggestions

    Dear All,
    My client requirement involves creation of Sales Orders both as standalone as well as based on Quotations, depending on the case. Now there is a UDF created in the Item Master Data called "U_Unit" which should be populated in another UDF (U_BPQty) in the Sales Order and Sales Quotation which can be changed at the transaction level.
    The requirement is if the Sales Order is created based on Quotation, the system should take the value from 'U_BPQty" of "Sales Quotation" and populate in the Sales Order. if the Sales Order is created as stand-alone, it should take the value from U_Unit field of the Item Master Data. I wrote the following query for that purpose and using it as a FMS but its not working.
    Can you suggest me where I am going wrong?
    Declare @Base varchar
    Declare @Item varchar
    Declare @Draw varchar
    Declare @BaseQty varchar
    Set @Base = (Select Case When $[$38.44.0] is Null then 0 when $[$38.44.0] is not Null then $[$38.44.0] end)
    Set @Item = ($[$38.1.0])
    Set @Draw = (SELECT T0.U_BPQty from QUT1 T0 INNER JOIN OQUT T1 ON T0.DocEntry = T1.DocEntry INNER JOIN RDR1 T2 ON T2.BaseRef = T1.DocNum WHERE T0.ItemCode = @Item)
    Set @BaseQty = (SELECT T0.U_Unit from OITM T0 WHERE T0.ItemCode = $[$38.1.0])
    Select Case when (@Base = 0) then @BaseQty when (@Base <> 0) then @Draw end
    Thanks and regards,
    Bharath S

    Hi Bharath.......
    As you said if SQ not there and SO is directly punched then it should Pick up U_Unit else if SQ has target of SO then U_BP then your query working fine.
    But if SQ not there and Del is directly punched instead of SO then it should Pick up U_Unit else if SQ has target of Delivery and not SO then U_BP. Is it?
    In such case its not working?
    If yes then use this query.......
    declare @basedoc as nvarchar
    set @basedoc=$[DLN1.BaseType.0]
    If @basedoc<1
    Begin
    Select T0.U_Unit from OITM T0 Where T0.ItemCode=$[DLN1.ItemCode.0]
    End
    If @basedoc>1
    Begin
    Select T0.U_BPQty From QUT1 T0 where T0.docentry=$[DLN1.BaseEntry.0] and T0.ItemCode=$[DLN1.ItemCode.0]
    End
    Else use this......
    declare @basedoc as nvarchar
    set @basedoc=$[DLN1.BaseType.0]
    If @basedoc<1
    Begin
    Select T0.U_Unit from OITM T0 Where T0.ItemCode=$[DLN1.ItemCode.0]
    End
    If @basedoc>1
    Begin
    Select T0.U_BPQty From RDR1 T0 where T0.docentry=$[$38.45.0] and T0.ItemCode=$[DLN1.ItemCode.0]
    End
    Regards,
    Rahul

  • How to disable - General preference - Create links from URLs. Using Acrobat Javascript

    http:\\www.sdss.com should not be suggested as a link. We have manual option to uncheck -> Create links from URLs, but I need to achieve this through the script.
    Please help on this ASAP.

    That is an end user preference only. Not accessible by JavaScript. If you control the installation, then you can turn off that option for the installation but the user could still turn it back on.

  • Problem in created project from DTR

    Hi,
    I am getting error when trying to do something in the newly created project from DTR.
    Error like this :
    Checkout is not possible. See below for details.
    The operation requires the writeability of the following Objects:
    Component Controller com.pg.adcs.stl.SendToLab
    ======>problem: DTR workspace is not modifiable /GGT_AntiDiv_Dsendtolabcom.pg.adcs/src/packages/com/pg/adcs/stl/SendToLab.wdcontroller.xlf
    ======>problem: DTR workspace is not modifiable /GGT_AntiDiv_Dsendtolabcom.pg.adcs/src/packages/com/pg/adcs/stl/SendToLab.wdcontroller
    Please help me on this...
    Thanks
    Arun

    Thank for the reply,
    After the created project from DTR, it was need to sync resoures and sync used DC. Now its working.

  • Problem in Sapscript , After creating a copy of Standard Script

    Hello friends,
                       I have copied a standard script WASCHEIN into ZWASCHEIN, now all the data is coming from driver program SAPM07DR. Now there is one field which is not coming from the standard program,
                      Is there any way i can capture the field in my script without making changes in the standard driver program like a select statement in the script.
    Thanks.
    Edited by: Vijay Babu Dudla on Dec 16, 2008 3:24 AM

    Hello Poonam,
    Sorry i think you are not aware of using PERFORM stmts in SAPScripts !!!
    @ Amit you can try this bit of coding:
    /:           PERFORM F_GET_KTEXT IN PROGRAM ZPROGRAM
    /:           USING &MSEG-NPLNR&
    /:           CHANGING &V_KTEXT&
    /:           ENDPERFORM
    Create a Subroutine-Pool Program: ZPROGRAM where you write the FORM for the above PERFORM.
    FORM f_get_cust_details
    TABLES fp_it_input  STRUCTURE itcsy
                  fp_it_output STRUCTURE itcsy.
    DATA:
      l_v_nplnr TYPE nplnr,
      l_v_ktext TYPE auftext. 
      READ TABLE fp_it_input WITH KEY name = 'MSEG-NPLNR'.
      IF sy-subrc = 0.
        l_v_nplnr = fp_it_input-value.
      ENDIF.
      SELECT SINGLE KTEXT
      INTO l_v_ktext
      FROM aufk
      WHERE aufnr = l_v_nplnr.
      LOOP AT fp_it_output.                                     "#EC *
        IF fp_it_output-name EQ 'V_KTEXT'.
    *     Modifying the output table with the customer number
          fp_it_output-value = l_v_nplnr.
          MODIFY fp_it_output.
      ENDLOOP.
    ENDFORM.
    Please note that passing the USING / CHANGING parameters through tables of ITCSY structures is a standard way of doing this & you cannot change this )
    Hope this helps.
    BR,
    Suhas
    Edited by: Suhas Saha on Dec 16, 2008 9:39 AM

  • Reservation created from a PM Order needs to create an automatic TR

    Hello Experts !!
    Needed your help much in a scenario where,
    A reservation created from a PM Order needs to create an automatic Transfer Requirement (TR) in WM directly which can later be converted to TO.
    (Please note that, I want to skip the GI part in IM with respect to reservation)
    Kindly suggest if there is any standard configuration for the same.
    Do batch jobs / user exit can only do it ??
    Regards,
    MC

    If you don't want to wait until PM order confirmation, use batch program for MB26 to issue committed quantities.
    Please note that MB26 will not handle serialized material issue.
    Thanks,

  • Is there any API or standard process to create structure from backend

    Hi,
    Is there any standard process to create structure from backend.I want to create 300 options for a option feature from backend.
    Please let me know the API through which it can be done.
    Best Regards,
    AJ

    AJ --
    Configurator provides a "Custom Import" capability to automatically create structure. It is documented in Chapter 5 ("Populating the CZ Schema") of the Oracle Configurator Implementation Guide.
    However, setting up a custom import may actually take you more time than just creating the Options manually in Configurator Developer. If the Options need to be duplicated across several Models, it may be advantageous to build them as Items in the Configurator Developer Item Master instead, and then use Populators to automatically create corresponding Options within your Option Feature(s).
    Eogan

  • Adobe Standard 9.1.0 crashes when attempting create .pdf from scanner

    Adobe Standard 9.1.0 crashes when attempting "create .pdf from scanner" from a Kyocera Mita KM-2550 using the twain driver. The error encountered is 0xc0000005 at address 0x0000000002d78e70. I have downloaded and installed the latest updates. This is happening on two new PCs with the same configuration. Is anyone else having this problem? Any suggestions?

    Spent quite a while on this one..  My problem was related to twain drivers which reside in c:\windows\twain_32.  I'm running windows 7 64-bit.  First it's usually possible to scan in windows 7 maybe vista and from adobe without even using twain (using WIA).  So try renaming the twain_32 folder to _twain_32 and see what happens...  If that stops the crashing look at the contents of the twain folder.  I had a Dell folder for some printer I wasn't even using.  That was causing the crash. I removed the dell folder and renamed the twain folder back to twain_32.  Now everything works as designed.

  • Hello friends recently shifted from windows to mac need some suggestion on which software to go ahead with for editing, excel,power point presentation

    Hello friends recently shifted from windows to mac need some suggestion on which software to go ahead with for creating word editing, excel,power point presentation.

    Only Microsoft's Office for Mac 2011 14.4.8 will work on your Windows Office files in their native document format. Anything else, and particularly Apple's Pages, Numbers, and Keynote will perform translation on open, and export. This can, and will, introduce differences to your original documents, especially when sharing with others in the Windows Office 2010/2013 applications.
    Here is my short list.
    Office for Mac 2011 v14.4.8
    LibreOffice (latest)
    The current iterations of Apple's Pages, Numbers, and Keynote are not what I would term business/professional grade applications. Apple updates them infrequently, ignores user friendly features, omits others, and has introduced default backwards incompatibility between Yosemite and prior OS X releases of these applications. Read the reviews in the OS X App Store. Even for free with a recent Mac purchase, these products will transform your mood.
    The free LibreOffice is aggressively developed and designed as an MS Office replacement suite. There are occasions where it can open documents that Office for Mac, and Apple's products ignore. Extensive PDF manuals for the individual applications. Unlike Word, you can have two-up page viewing with a button click, or edit multi-page PDF. There is a forms designer. It can open nearly any document including MS Publisher and Visio documents from the Windows space. I use it.
    MS Office 2015 Preview for Yosemite is available, but as its title would suggest, it is not done yet, and some features are missing. I created a single-page Word document with a DRAFT watermark. Only LibreOffice v4.4.1 was able to open this document and preserve the watermark.

  • Adobe Acrobat XI Standard crashes when we create pdf from scanner

    We are using adobe acrobat XI standard, version 11.0.06
    WIndows 7 Pro 64 bit
    scanner: Xerox documate 4799
    Acrobat crashes when we create pdf from scanner

    Spent quite a while on this one..  My problem was related to twain drivers which reside in c:\windows\twain_32.  I'm running windows 7 64-bit.  First it's usually possible to scan in windows 7 maybe vista and from adobe without even using twain (using WIA).  So try renaming the twain_32 folder to _twain_32 and see what happens...  If that stops the crashing look at the contents of the twain folder.  I had a Dell folder for some printer I wasn't even using.  That was causing the crash. I removed the dell folder and renamed the twain folder back to twain_32.  Now everything works as designed.

  • Acrobat Standard 9.1.1 crashes on Create PDF from scanner

    All options under the Create PDF from scanner sends Acrobat Standard 9.1.1 crashing.
    Faulting application Acrobat.exe, version 9.1.0.163, time stamp 0x49a88b32, faulting module dlbatwds.ds, version 3.107.0.0, time stamp 0x45df4d3d, exception code 0xc0000005, fault offset 0x00004da2, process id 0xce4, application start time 0x01c9dca1b4c4360b.
    Tried with both scanners CanoScan LiDE 600F and Dell 920A
    I am using Vista Ultimate x64.Have tried turning off UAC and also tried running as Administrator.
    No luck yet. Anyone have the same issue?

    This might be a scanner issue. Have you tried scanning using other applications?
    If not, can you try the following steps once?
    1. Download TWACKER (Twack_32.msi) from http://www.twain.org/downloads.shtm
    2. Install it.
    3. Go to <Program files>\TWAIN Working Group\Twacker 32 and invoke Twack_32.exe.
    4. Go to File menu > Select Source.
    5. Select the TWAIN driver (not the WIA driver) for HP M1212nf and Click OK.
    6. Now, invoke File > Acquire menu.
    Please update with the result.
     

  • I need help to create  idoc from scrach.

    i need help to create  idoc from scrach.

    Swamy Katta,
    Please read "[the rules|https://www.sdn.sap.com/irj/sdn/wiki?path=/display/home/rulesofEngagement]" before you post any further, and confirm that you have read them?
    => Search first, ask questions later please!
    Julius

  • I need to call main window from a Standard program

    I need to call main window from a Standard program for SAP Script. I have wrote the code like this but it is not working. Kindly help me on that.
          FORM OPEN_AND_START_FORM                                     
    FORM open_and_start_form.
      CALL FUNCTION 'OPEN_FORM'
        EXPORTING
          device   = 'PRINTER'
          dialog   = space
          form     = 'ZOTC_SLI'
         language = print_co-spras
         OPTIONS  = pr_options
        EXCEPTIONS
          canceled = 01
          device   = 02
          form     = 03
          OPTIONS  = 04
          unclosed = 05.
      CHECK sy-subrc IS INITIAL.
      CALL FUNCTION 'WRITE_FORM'
        EXPORTING
          window  = 'MAIN'.
    ENDFORM.                    "OPEN_AND_START_FORM
          FORM CLOSE_AND_END_FORM_FORM                                  *
    FORM close_and_end_form.
      CALL FUNCTION 'END_FORM'.
    ENDFORM.                    "CLOSE_AND_END_FORM

    Hi,
    FORM CLOSE_AND_END_FORM_FORM *
    FORM close_and_end_form.
    CALL FUNCTION 'END_FORM'.
    change this to CALL FUNCTION 'close_FORM'.
    as you are not using the start_form
    you can use End_form
    i hope you understand now
    ENDFORM. "CLOSE_AND_END_FORM
    reward points if helpful.
    thanks & regards,
    venkatesh

  • I have a Mac.  I need  suggestions on what program to purchase to create a few PDF files

    I have a Mac.  I need  suggestions on what program to purchase to create a few PDF files

    ~graffiti wrote:
    Why would you say that LiveCycle is the only thing to recommend (but isn't available for Macs) then bring up InDesign?
    If it can't be done by the Mac OS (she hasn't mentioned what she has) then it can be done with Acrobat. She asked about a program to create PDF files. That's pretty much what Acrobat does.
    where is whatI said.
    Being That LiveCycle designer is not availble for Mac. That would be about the only thing to recommend. InDesign Maybe but more pricey.
    The part I've underline refers to Acrobat.  InDesign Maybe but more pricey referes to, Indesign being more expensive than Acrobat.

  • I recently updated to the latest Mac OS, and have lost the capacity to create PDFs from my HP scanner.  Any suggestions?

    I recently updated to the latest Mac OS, and in the process I seem to have lost the capacity to create PDFs from my HP scanner. 
    With each prior OS, I could scan and immediately save any scanned file in PDF format.  Now it is not allowed, and creates a file
    that has nothing but noise, even though the scan software seems to show that each scan is captured correctly (in the scan window,
    before I ask it to save the file).  When trying to save to PDF,  I get a message that tells me that this is a read-only file, which I don't
    quite understand, since the same scanning / saving process always created a PDF in the past.
    iMac 27 inch----HP Officejet 7310
    Any suggestions?

    Thanks very much for the response.  I checked for new HP software, and learned there is no new version.  I also noted when reading about the new OS 10.9 that all driver software is now part of the MAC OS and no longer supplied by the vendor of the printer / scanner.  I suspected this is where the trouble is located.....but I did not know how to ascertain what could be done to restore my PDF creation capabilities.   The next message below yours had the solution, so all is well now.  Now you know as well-----Many thanks again for taking the time to respond!!

Maybe you are looking for

  • Satellite M300 - Where can I buy a new keyboard?

    My keyboard was broken. Now I want to buy a new key board for this model to replacement but I can't find where to buy it. Please help me! This is the pictures of this model with black glossy keyboard. http://imall.ntu.edu.sg/pic/Toshiba%20Satellite%2

  • What is use of Capital & Manual Event in Oracle Capital Projects?

    Hi Dina / Experts, Can anyone explain me the real application scenario or use where Capital Event or Manual Event will be in used? As per my understanding it is used for assigning and allocating unprocesses asset lines to Asset. But I am not sure. Yo

  • What happened to my calendar?

    As of today all of my events are missing for this month and the follwoing. All events are present for November and earlier but none for December and forward.

  • Conditional import in Java?

    Hi All, Is some way available to custom import packages? For eg, I have a mock_middleware package used for testing & initial development process. But there is another package called middleware which is being simultaneously developed. I want to set a

  • The video button does not activate on itunes when i connect the 30GB ipod

    I have a 30GB ipod. when i connect it to the computer and start itunes, and go to the "ipod" tab, and then "video", after that, none of the video buttons are active (such as "actomatically update all videos"; "do not update videos" etc. I have the la