How to send a custom script configured in QC02 tcode as an pdf attchement

Hi All,
In my requirement I configured SAPScript in QC02 Tcode.Now when I execute QC22 Tcode COA will be generated.Here before displaying the form output I need a pop up box asking a question that 'do you need a print or need to send an email?'.But an issue is how to get control on the standard program,Is there any enhancement spot or Exit to write the code for converting to pdf and to send email to the user.Help me if any one knows.If any doubts regarding the requirement please revert back.
Thanks in advance.
Regards,
Satya.

Hi All,
In my requirement I configured SAPScript in QC02 Tcode.Now when I execute QC22 Tcode COA will be generated.Here before displaying the form output I need a pop up box asking a question that 'do you need a print or need to send an email?'.But an issue is how to get control on the standard program,Is there any enhancement spot or Exit to write the code for converting to pdf and to send email to the user.Help me if any one knows.If any doubts regarding the requirement please revert back.
Thanks in advance.
Regards,
Satya.

Similar Messages

  • How to fetch data into my custom script configured in qc02 transaction

    Hi All,
    I configured the custom SAP-Script in place of standard script name in QC02 tcode.In my requirement when I execute QC22
    transaction the custom script will be triggered along with some data based on material number,batch number and plant.I need to fetch QALS-KTEXTMAT , QALS-CHARG, MCH1-HSDAT and MCH1-VFDAT.Please help me how to fetch this data.Any Enahancement need to use or any spot is there Please specify.
    Thanks in advance.
    Regards,
    Satya.
    Edited by: satyareddygade on Sep 8, 2011 2:13 PM

    Hi Satya,
    Try like this in your Script window text element.
    /: PERFORM FETCH_KTEXTMAT IN PROGRAM <Z Subroutine Pool program>                                                                               
    /: USING &QALS-PRUEFLOS&                                                                               
    /: CHANGING &GV_KTEXTMAT&                                                                               
    /: ENDPERFORM
    in Z Subroutine Pool program
    FORM fetch_ktextmat TABLES  intab  STRUCTURE itcsy
                                outtab STRUCTURE itcsy.
      DATA:
        lv_prueflos TYPE qals-prueflos,
        lv_ktextmat TYPE qals-ktextmat.
    *---Get Inspection Lot Number
      READ TABLE intab WITH KEY 'QALS-PRUEFLOS'.
      CHECK sy-subrc = 0.
      lv_prueflos = intab-value.
      SELECT SINGLE ktextmat FROM qals INTO lv_ktextmat WHERE prueflos EQ lv_prueflos.
      outtab-value = lv_ktextmat.
      MODIFY outtab FROM outtab TRANSPORTING value WHERE
      name = 'GV_KTEXTMAT'.
      CLEAR : intab,outtab.
    ENDFORM.                    "FETCH_KTEXTMAT
    /: PERFORM FETCH_HSDAT IN PROGRAM <Z Subroutine Pool program>    
    /: USING &*VBDPL-MATNR&
    /: USING &VBDPL-CHARG&
    /: CHANGING &GV_HSDAT&
    FORM fetch_hsdat TABLES  intab  STRUCTURE itcsy
                                outtab STRUCTURE itcsy.
      DATA:
        lv_matnr TYPE vbdpl-matnr,
        lv_charg TYPE vbdpl-charg,
        lv_hsdat TYPE mch1-hsdat.
    *---Get Material Number
      READ TABLE intab WITH KEY '*VBDPL-MATNR'.
      CHECK sy-subrc = 0.
      lv_matnr = intab-value.
    *---Get Batch Number
      READ TABLE intab WITH KEY 'VBDPL-CHARG'.
      CHECK sy-subrc = 0.
      lv_charg = intab-value.
      SELECT SINGLE hsdat FROM mch1 INTO lv_hsdat WHERE matnr EQ lv_matnr
                                                    AND charg EQ lv_charg.
      outtab-value = lv_hsdat.
      MODIFY outtab FROM outtab TRANSPORTING value WHERE
      name = 'GV_HSDAT'.
      CLEAR : intab,outtab.
    ENDFORM.                    "FETCH_HSDAT
    Use the following program symbols where you want to print.
    &GV_KTEXTMAT& &QALS-CHARG& &GV_HSDAT& and &MCH1-VFDAT&
    Regards,
    Surya.

  • How to fetch Signature in to my custom script configured in qc02 from DSAL

    Hi All,
    In my requirement I need to get the signature from DSAL tcode for a particular material(may be BULK or FINISHED) while executing QC22 tcode.I already got the remaining data in to the form like QALS-KTEXTMAT , QALS-CHARG,MCH1-VFDAT and MCH1-HSDAT
    by writing subroutine pool program in my script.Only thing left is need to fetch Digital Signature(signature for a material who certifies).
    Help me if anyone knows.Thanks in advance.
    Regrads,
    Satya.

    Hi Satya,
    Implement USER EXIT to link the signature to your custom script.
    Refer following link it may be useful...
    http://wiki.sdn.sap.com/wiki/display/SAPMDM/E-SIGNATUREforMaintenancePlants-MasterData(ECC6.0)
    Regards,
    Surya.

  • How to use a custom script in a batch process?

    I was recently told that I can Photomerge, crop and save 2 separate folders of images to a 3rd folder in a batch process if I created a custom Javascript.  Are there any examples of how to integrate a custom script as an action in a batch process?

    if you recieve an image from mms you can save the object to gallery and then select it as wallpaper
    If  i have helped at all a click on the white star below would be nice thanks.
    Now using the Lumia 1520

  • How to send multiple customer statements by email using RFKORD11 program.

    Hi All,
    How to send multiple customer statements by email using RFKORD11 program. Is it possible?
    As of now we copied the stanadard program and sending the customer statements by email, one by one.
    if i execute the z program it will show the customer statement and send mail option.
    if i click send mail it will send that customer statement to the corresponding customer.
    then again i need to click back, it will show next customer statement and click on send mail.
    Pl guide me, if any one worked on this program.
    thanks in advance.
    Regards,
    Mahesh

    Try execute the program in the background to see if that helps.

  • How to send multiple customer statements by email using RFKORD11

    Hi All,
    How to send multiple customer statements by email using RFKORD11 program.
    As of now we copied the stanadard program and sending the customer statements by email, one by one.
    if  i execute the z program it will show the customer statement and send mail option.
    if i click send mail it will send that customer statement to the corresponding customer.
    then again i need to click back, it will show next customer statement and click on send mail.
    Pl guide me, if any one worked on this program.
    Regards,
    Mahesh

    Hi .
    You first need to copy that program to Z and make the changes in it. Can you convert sapscript to smartform?
    then you can write a logic to send mail in the loop.
    to send the pdf file
    https://www.sdn.sap.com/irj/scn/wiki?path=/display/snippets/mailsendthroughoutputcontrols
    Regards,
    Madhuri
    Edited by: madhuri sonawane on Jun 10, 2009 4:20 PM

  • How to send Smartform and Script in email?

    hi myself Devendra,
    i ve some queries....regarding the Script and Smartform.
    1- Can any body tell me how to send Script as well as Smartform layout in mail output.
    I ve created script and smartform for the PO confirmation.
    2- If i want to send both script and smartform layout of the PO, whenever created,automatically to the Vendor,then what i ve to do.

    Hey,
    REPORT zemail_gm.
    *********Variable Declarations *****************************
    DATA: gv_form_name TYPE rs38l_fnam, " Used to store the function module generated by Smartform
    gv_bin_filesize TYPE i, " Store the file size
    gv_pos TYPE i,
    gv_len TYPE i,
    gv_tab_lines TYPE i.
    ********Constants *******************************************
    Data : gc_text(11) type c value 'Form Output',
    gc_tst(3) type c value 'TST',
    gc_testing(7) type c value 'Testing'.
    *********Work Area Declarations *****************************
    DATA: gs_docdata TYPE sodocchgi1, " Data of an object which can be changed
    gs_ctrlop TYPE ssfctrlop, " Smart Forms: Control structure
    gs_outopt TYPE ssfcompop, " SAP Smart Forms: Smart Composer (transfer) options
    gs_otfdata TYPE ssfcrescl, " Smart Forms: Return value at end of form printing
    gs_reclist TYPE somlreci1, " SAPoffice: Structure of the API Recipient List
    gs_pdf_tab TYPE tline, " Workarea for SAP Script Text Lines
    gs_objbin TYPE solisti1, " SAPoffice: Single List with Column Length 255
    gs_objpack TYPE sopcklsti1. " SAPoffice: Description of Imported Object Components
    *********Internal tables Declarations *****************************
    DATA: gt_reclist TYPE TABLE OF somlreci1, " SAPoffice: Structure of the API Recipient List
    gt_pdf_tab TYPE TABLE OF tline, " SAPscript: Text Lines
    gt_otf TYPE TABLE OF itcoo, " OTF Structure
    gt_objbin TYPE TABLE OF solisti1, " SAPoffice: Single List with Column Length 255
    gt_objpack TYPE TABLE OF sopcklsti1. " SAPoffice: Description of Imported Object Components
    CLEAR : gv_form_name,
    gs_ctrlop,
    gs_outopt,
    gs_otfdata,
    gv_bin_filesize,
    gv_pos,
    gv_len,
    gv_tab_lines.
    START-OF-SELECTION.
    • Generate Function Module name
    CALL FUNCTION 'SSF_FUNCTION_MODULE_NAME'
    EXPORTING
    formname = 'ZPDF_G'
    IMPORTING
    fm_name = gv_form_name
    EXCEPTIONS
    no_form = 1
    no_function_module = 2
    OTHERS = 3.
    IF sy-subrc 0.
    MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
    WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
    ENDIF.
    • Assigning values to Form Control Structure and Form Composer
    gs_ctrlop-getotf = 'X'.
    gs_ctrlop-no_dialog = 'X'.
    gs_outopt-tdnoprev = 'X'.
    • Getting the OTFDATA
    CALL FUNCTION gv_form_name
    EXPORTING
    control_parameters = gs_ctrlop
    output_options = gs_outopt
    user_settings = 'X'
    IMPORTING
    job_output_info = gs_otfdata
    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.
    ENDIF.
    • Assigning the OTFDATA to OTF Structure table
    CLEAR gt_otf.
    gt_otf] = gs_otfdata-otfdata[.
    • Convert the OTF DATA to SAP Script Text lines
    CLEAR gt_pdf_tab.
    CALL FUNCTION 'CONVERT_OTF'
    EXPORTING
    format = 'PDF'
    max_linewidth = 132
    IMPORTING
    bin_filesize = gv_bin_filesize
    TABLES
    otf = gt_otf
    lines = gt_pdf_tab
    EXCEPTIONS
    err_max_linewidth = 1
    err_format = 2
    err_conv_not_possible = 3
    OTHERS = 4.
    IF sy-subrc 0.
    MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
    WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
    ENDIF.
    • Assigning the Description of the object sent in the mail
    CLEAR gs_docdata.
    gs_docdata-obj_name = gc_tst.
    gs_docdata-obj_descr = gc_testing.
    • Assigning the email id to Structure of the API Recipient List table
    CLEAR : gt_reclist, gs_reclist.
    gs_reclist-receiver = '<give the mail id of the receiver'.
    gs_reclist-rec_type = 'U'.
    APPEND gs_reclist TO gt_reclist.
    • Passing the SAP Script text lines to SAPoffice: Single List with Column Length 255 table
    CLEAR : gs_objbin, gs_pdf_tab.
    LOOP AT gt_pdf_tab INTO gs_pdf_tab.
    gv_pos = 255 - gv_len.
    IF gv_pos > 134. "length of pdf_table
    gv_pos = 134.
    ENDIF.
    gs_objbin+gv_len = gs_pdf_tab(gv_pos).
    gv_len = gv_len + gv_pos.
    IF gv_len = 255. "length of out (contents_bin)
    APPEND gs_objbin TO gt_objbin.
    CLEAR: gs_objbin, gv_len.
    IF gv_pos < 134.
    gs_objbin = gs_pdf_tab+gv_pos.
    gv_len = 134 - gv_pos.
    ENDIF.
    ENDIF.
    ENDLOOP.
    IF gv_len > 0.
    APPEND gs_objbin TO gt_objbin.
    ENDIF.
    • Filling the details in SAPoffice: Description of Imported Object Components table
    DESCRIBE TABLE gt_objbin LINES gv_tab_lines.
    CLEAR gs_objbin.
    READ TABLE gt_objbin INTO gs_objbin INDEX gv_tab_lines.
    IF sy-subrc = 0.
    gs_objpack-doc_size = ( gv_tab_lines - 1 ) * 255 + STRLEN( gs_objbin ).
    gs_objpack-transf_bin = 'X'.
    gs_objpack-head_start = 1.
    gs_objpack-head_num = 0.
    gs_objpack-body_start = 1.
    gs_objpack-body_num = gv_tab_lines.
    gs_objpack-doc_type = 'PDF'.
    gs_objpack-obj_name = 'ATTACHMENT'.
    gs_objpack-obj_descr = 'test'.
    APPEND gs_objpack TO gt_objpack.
    ENDIF.
    • Sending the Form Output in the PDF format to email
    CALL FUNCTION 'SO_NEW_DOCUMENT_ATT_SEND_API1'
    EXPORTING
    document_data = gs_docdata
    put_in_outbox = 'X'
    commit_work = 'X'
    TABLES
    packing_list = gt_objpack
    contents_bin = gt_objbin
    receivers = gt_reclist
    EXCEPTIONS
    too_many_receivers = 1
    document_not_sent = 2
    document_type_not_exist = 3
    operation_no_authorization = 4
    parameter_error = 5
    x_error = 6
    enqueue_error = 7
    OTHERS = 8
    IF sy-subrc 0.
    MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
    WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
    ELSE.
    WRITE 'Sent Successfully'.
    ENDIF.
    SUBMIT rsconn01
    WITH mode EQ 'INT'
    AND RETURN.
    END-OF-SELECTION.Regards,
    Midhun Abraham
    Edited by: Midhun Abraham on Oct 12, 2008 4:06 AM

  • How to send mail to vendor mail id from Tcode MIGO when GR is created

    Hi Experts,
    My requirement is to send one mail to vendor when GR is created in Tcode MIGO.
    I tried to setup configuration in tcode NACE, creating new message type MAL1.  but i am not able to locate Message tab in tcode MIGO, also, When i goto transaction MB02 i can give message type MAL1 in output types then mail is going to scot, but my main problem is as:
    Output type MAL1 is not automacially trigerred from transaction MIGO (I need to go to MB02 and add output type in Messages)
    Please help me to configure this. Again, i did configuration only in NACE and not any other tcode. So please tell me whether i need to configure in other tcodes specifcally WE20 (if yes, please give me message type and process code for GR) .
    Many thanks, please help me. points assured!
    Thanking you,
    Jogdand M B

    Hi,
    Via t-code NACE select inventory management, then you can use output type WE01 or MLGR base on transmission medium -- 5 External send. After that you need to maintain the condition record accordingly, then that will be ok! After GR with MIGO, system will generate a email to vendor's mailbox in the vendor master data!
    Good luck
    Tao

  • How to i write a script that makes multiple selections in a pdf and exports them to excel?

    I have a large number of PDFs
    Not all the PDFs contain information we need. We want to be able to automate a script that extracts certain info from the PDFs and opens them in a certain format in excel.
    Acrobat allows me to make a single selection and export as excel.
    How do i export multiple parts to excel from the pdfs and ensure that the resulting excel is in a format that i can use without much fixing needed (e.g. merged cells)?

    This type of process can't really be done using JavaScript. You would need to read the contents of the file, word by word, decide (based on some logic) what data to extract, and then collect it and at the end export to a plain-text file. Not a simple process...

  • How to execute a SAP Script Configured in NACE as Output type?

    Hi all,
    I know the Outputtype. How to execute the Script? I have to modify the Script.
    Please help me.
    Thanx,
    Suresh

    After you have run TOAD and connected to Oracle DB, TOAD will open a "SQL Editor" window. If it does not, you can open it by clicking the "SQL" or "Editor" button in the tool bar.
    You can open the script in TOAD's SQL Editor Window like this:
    Press "Open File" button (yellow file icon) from the tool bar [ or from File menu, click "Open File" option]
    Navigate to directory where you script is residing
    select the script file and press "Open" button
    Now you can press the yellow 'bolt' button to execute your script.
    Once you have run the script successfully, click on the "Schema Browser" button [ which is next to the "Editor" button ]. In the schema browser's "Tables" tab, you can look for the table you have created.
    Alternately, you can also use SQLPlus to run your script either after launching SQLPlus and connecting to DB or from the command line.
    >
    i am not that much aware of toad .....
    >
    To get familiar with the tool, you'll have to explore it yourself if you plan to continue using it.
    NOTE
    You do not need "commit" after DDL statements. I noticed "commit" statements in your script. You can remove them.
    HTH

  • How to attach a customer program during saving in tcode qm02

    hi,
    i have written a abap program which will send emails after saving data in qm02 . but i do not know how to attach this program so that it executes upon saving data in qm02 . can any one help me out .
    thanks in advance.
    Kallol.

    Hi Kallol,
    Check with this user exit QQMA0014  QM/PM/SM: Checks before saving a notification.
    Close the thread if this solves your query.
    Regards
    Abhii

  • SMS send to Customer while customer creation cic webclient

    Hi Experts,
    We have a requirement that " Send SMS from BP (customer Master)". Send SMS to customer's mobile after successfully creating customer master record by pressing SAVE button in CIC WEB Client Account identification New bp (sold to party).
    How to send SMS from BP(SOLD TO PARTY) tcode? We have creating customer from account identification through u201C new u201Cin cic web client.
    Please suggest me any abap program to fulfill this requirement.
    Please help me out.
    Regards,
    KANTH

    Hi,
    Please check this [link|Re: How to send SMS by using ABAP program].
    Regards,
    Shobhit

  • How to uncheck Send Notification check box by custom script in supplier's contact Account management tab?

    Hi Experts,
    We have a requirement to uncheck the Send Notification check box by custom script in supplier's contact account mangement tab while page loading while creating new contact for the supplier. I have attached screen shot for reference.
    I have searched several API Java classe for get and set methods for this Send notification field but no luck.
    If anyone have an idea about get and set methods for this field please share.
    Help would be appreciated and points awarded!
    Thanks,
    Lava.

    Hi Lava,
    Inorder to uncheck the Send Notification checkbox while loading the page you have to write the script targeting the class Contact(600) and target as Loaded.
    Include below lines in your custom script (contact onload Script)
    doc.getFieldMetadata("SEND_NOTIFICATION").set(doc,FALSE);
    You can create it in On create Script also.
    Hope it helps.
    Thanks,
    Raj.

  • How do you configure a VM image to run a custom script ONCE on startup?

    Hello,
    I am creating a Windows image that will be deployed to the VM depot:
    https://vmdepot.msopentech.com/List/Index
    When the image is run for the first time, I'd like to run a custom script.  However, I only want this script to run the first time the VM is run (and never again).
    How would I do this?
    Thanks!
    Matt

    Hi,
    Please see SetupComplete.cmd at
    http://technet.microsoft.com/en-us/library/dd744268(v=ws.10).aspx
    Anders Bengtsson | Microsoft PFE | blog at http://www.contoso.se

  • How To send SAP SCRIPT AS an email.

    Hi,
    Any one knows how to send sap script output to users in the form of an email.
    Is there any other way to send it apart from sending the script output to spool and converting the spool to PDF and send that PDF to user?
    It would it helpful for me if u can let me know any peace of code as an example for the same.
    Message was edited by: Narasimha

    Hi,
    This may be too late but here is a really easy way
    Here is a snippet of code that will help you out.
    You can use the OPEN_FORM of the SAPscript to have a device type of MAIL instead of PRINTER
          Form  OPEN_FORM
          Open SAPscript form to send to user
    FORM OPEN_FORM .
    *--- Set recipient
      GW_COMM_VALUES-ADSMTP-SMTP_ADDR = '[email protected]'.
    *--- Set NAST details as these will not currently be set....
      CLEAR GW_SNAST.
      GW_SNAST-ANZAL = 1.
      GW_TITLE = 'Mail Header Title'.
      MOVE GW_TITLE TO GW_SNAST-TDCOVTITLE.
    *--- Set sender and recipient details
      CALL FUNCTION 'CONVERT_COMM_TYPE_DATA'
        EXPORTING
          PI_COMM_TYPE              = 'INT'
          PI_COMM_VALUES            = GW_COMM_VALUES
          PI_REPID                  = SY-REPID
          PI_SNAST                  = GW_SNAST
          PI_MAIL_SENDER            = SY-UNAME
        IMPORTING
          PE_ITCPO                  = GW_ITCPO
          PE_MAIL_RECIPIENT         = GW_RECIPIENT
          PE_MAIL_SENDER            = GW_SENDER
        EXCEPTIONS
          COMM_TYPE_NOT_SUPPORTED   = 1
          RECIPIENT_CREATION_FAILED = 2
          SENDER_CREATION_FAILED    = 3
          OTHERS                    = 4.
    *--- Open SAPscript in MAIL mode for e-mailing
      CALL FUNCTION 'OPEN_FORM'
        EXPORTING
          DEVICE                      = 'MAIL'
          DIALOG                      = 'X'
          FORM                        = SapScript Form Name
          LANGUAGE                    = SY-LANGU
          OPTIONS                     = GW_ITCPO
          MAIL_SENDER                 = GW_SENDER
          MAIL_RECIPIENT              = GW_RECIPIENT
        EXCEPTIONS
          CANCELED                    = 1
          DEVICE                      = 2
          FORM                        = 3
          OPTIONS                     = 4
          UNCLOSED                    = 5
          MAIL_OPTIONS                = 6
          ARCHIVE_ERROR               = 7
          INVALID_FAX_NUMBER          = 8
          MORE_PARAMS_NEEDED_IN_BATCH = 9
          SPOOL_ERROR                 = 10
          CODEPAGE                    = 11
          OTHERS                      = 12.
    When you have finished your SAPscript and call function CLOSE_FORM make sure you do a COMMI WORK after the call of this function.
    You should then see the mail created in SOST.
    Kind regards
    Colin

Maybe you are looking for

  • Using an XML file as a data source for XI in NW CE 7.1 DS

    I am trying to set up a simple demonstration of XI capabilities by grabbing an XML file from one location and putting the data into WEI in and ISA 95 format.  I have set up my XML file (and schema) as an XML Data Source under ODA Data Sources.  Howev

  • JDBC gives error if accessing Package Synonym

    Calling a stored procedure in a package using JDBC... Where we are using a synonym for our package (given all permissions are OK - I've even tried SYSDBA) rather than calling procedures directly in the package, we get the error 'table or view does no

  • Change "Description" name for Hyper-V Core for networks

    Hello, i am creating 3 seperate networks for our Hyper-v Environment : - Core - Live Migration - Production When a multiple network-cards are teamed, the description of a team is : "Microsoft Network Adapter Multiplexor Driver". I want to change this

  • Datatype in Oracle warehouse builder

    I try to create an external table in OWB. because some of my columns are large I like to use clob as a datatype for some of these columns. Is this possible in OWB? I could not to find it in OWB. Or is there any other way to use columns which can hold

  • Print a list of files and folders

    Dose anyone know an easy way of listing files and folders from a disk? I need an inventory of the names on some ZIP disks.