Creating Plugin Script

Hi Friends,
I want to create plugin script for algorithm ,can any one pls explain me doubts to crate this plugin
1.In Plugin Script How can i get the soft paramenters (like in service script we have schema containts local variables(parms) for getting values from ui)
2.how can we include new hard parameters into Algorithm entity(should we place use=input/output)
My Requirment is the plugin script should take accountid and return boolean value by validating contracted quantity.
i tested this requirment with one simple ui and service script which use Bussiness Service .how can i convert service script to plugin script
For creating plugin script i am taking Ratecomponet as algorithm entity.here how can i get accountid and how can i send boolean value as a result.
thanks&regards
sivaram

Your requirements are a bit confusing, when you say "contracted quantity", are you referring to the Contract Quantity defined on the Service Agreement (if maintained)? OR since you have mentioned Account, is the "contracted quantity" defined on the Account as a Characteristic?
If the latter then you don't need any Algorithm or Plug-in Script to do the task, you can configure Rate Component Eligibility - Criteria Field as 'Characteristic' and specify Account as the Characteristic Entity and choose the characteristic type. Also, use Rate Component Eligibility - Criteria Comparison and specify the logical operator for comparing the retrieved "contracted quantity" on the Account. Alternatively, you could also configure a SQ Rule having SQ Algorithm of type 'Characteristic Value' and retrieve the "contracted quantity" from the Account. In this case you can then have Rate Component Eligibility - Criteria Field to be 'Service Quantity', select the SQI defined on the SQ Rule and do the comparison.
If the former, you need to define a SQ Rule (also configured on the Rate Schedule) to fetch the Contract Quantity of a specific type on the SA and assign it to the SQ Array of your choice.
In either case you don't need a custom Plug-in Script / Algorithm (I assume Rate Component - Criteria Field spot/entity).
Nevertheless, if you still want to define an Algorithm for Rate Component - Criteria Field entity, you should keep following points in mind (considering your requirement):
- Account Id is not available in the given script schema, although SA Id is available, hence you'd need a Business Service to retrieve the Account Id from the SA Id.
- After evaluation, you need to return a boolean for following"output" parameters, either true or false:
parm/hard/isSingleCriteriaFieldValue
parm/hard/singleCriteriaFieldValue
parm/hard/isCriteriaFieldFound- Thereafter, compare the boolean value under Rate Component Eligibility - Criteria Comparison and set the "If True" and "If False" conditions as per your requirements.

Similar Messages

  • How To Create Plugin/Script

    I have seen some source for LR plugins/scripts. However, searching for some books or posts on this forum I have not found any information on how to create such plugins/scripts. Where can I find some documentation about that?

    http://www.adobe.com/devnet/photoshoplightroom.html
    http://forums.adobe.com/community/lightroom/lightroom_sdk
    Beat

  • Is there a quick-start guide to creating plugins ?

    Hello Adobe Community,
    I would like to know if there is a guide or something similar that shows how to create a very-very simple plugin (maybe change only one parameter of a layer) ?
    Right now there is only the SDK.pdf, which isn't the best place for a first-time plugin creator.
    I have created a script in ExtendScript, which I'd like to package into a plugin to make it easier to the end user.
    I have searched the forums and the internet thoroughly and the only things that say something about plugin creation are very outdated.
    Any resources or tutorials about creating a plugin on Windows would be very helpful.
    I would also like to know how can I download the older versions of After Effects to test my scripts and plugins ? (I am a CC user.)
    Thank you!
    B2H

    what you should duplicate is a whole sample folder.
    for instance, to duplicate the "shifter" sample, you should duplicate the
    whole shifter folder.
    now that you have a copy of that folder, rename that folder to your new
    plug-in's name, for example "shpitz".
    next you'd probably want to use some "mass text replace" software to
    replace strings in all the files in that folder at once, but you can do it
    one by one in a regular text editor.
    swap the following strings in all the files:
    shiter -> shpitz
    Shifter -> Shpitz
    SHIFTER -> SHPITZ
    you have to make these changes in all .cpp, .h, vcproj, ect... files. (in
    shot, ALL files in that folder)
    when you're done, you need to replace the file names in the folder as well:
    shifter.cpp -> shpitz.cpp
    shifter.h -> shpitz.h
    shifterPiPL.r -> shpitzPiPL.r
    shifter.vcproj -> shpitz.vcproj
    are you all done?
    make sure that folder is placed in the "examples" folder. (where the
    "shifter" folder is)
    now in visual studio, right click the "Build em all" solution, and select
    "add existing project". point to shpitz.vcproj, and that's it.
    you now have an independent copy of "shifter" ready to mess with.

  • Passing Case Char to plugin script

    Greeting !
    My requirement is to pass Account ID and a Characteristic value (Adjustment ID) as input parameters to an algorithmic, then to a Plugin script that will invoke a business service that will invoke a Query Zone with two filter parameters.
    I created a Query Zone that takes two filter parameters, and then created a Business Service to invoke this Zone.
    Also I created a new script, and an algorithm type that references this script.
    Now I am facing difficulties in passing the values from the user interface (Account ID & Char val) from the Case screen to the algorithm.
    Can anybody kindly guide on how to pass these values to the algorithm (and eventually to the business service & Zone) ?
    Thanks in advance
    AK

    Hi,
    01. Create a Business Object for Case MO, BO schema like below
    <schema>
    <toDoCaseId mapField="CASE_ID"/>
    <status mapField="CASE_STATUS_CD"/>
    <personId mapField="PER_ID"/>
    <accountId mapField="ACCT_ID"/>
    <caseCharacteristic type="list" mapChild="CI_CASE_CHAR">
    <toDoCaseId mapField="CASE_ID"/>
    <characteristicType mapField="CHAR_TYPE_CD"/>
    <sequence mapField="SEQ_NUM"/>
    <searchCharacteristicValue mapField="SRCH_CHAR_VAL"/>
    <adhocCharacteristicValue mapField="ADHOC_CHAR_VAL"/>
    <characteristicValue mapField="CHAR_VAL"/>
    </caseCharacteristic>
    </schema>
    02. Include the Case BO(CmCaseBO) in your plugin script as Data Area
    03. Move the Case Id to Case BO
    move "parm/hard/case/id" to "CmCaseBO/toDoCaseId";
    04. Invoke your Case BO
    invokeBO 'CmCaseBO' using "CmCaseBO" for read;
    05. Now your custom case bo will have all the case details including case chars
    06. Now Move the Account Id and Char value from your custom case bo to your Business Service which in turns refer the Query Zone.
    07. And invoke the Business Service

  • How to Create Plugin for InDesign?

    Hi,
    I am working with InDesign Scripting very well and now I want to start working with plugin for InDesign CS3 because of the limitation of the Scripting. But I have no idea, how to start and where to start creating Plugin for InDesgn CS3.
    I am using Windows OS
    Can someone tel me clearly how and where to start Creating Plugin and suggest me any plugin editor for Win OS. You can also suggest me at [email protected]
    Someone pls guide me.......
    Thank You.

    Hi, Praveen
    Thanks for your reply,
    I am going to look for  "programming-guide.pdf" and then take further steps to plugin.
    But can you tell me what are the resources that can be created by Eclipse 3.2.2 and why we use two Editors (VC++ Editor and Eclipse 3.2.2) here.
    Thanks,
    Vivek

  • Why cant i create a script???? help!!!

    Right so ive been playing around with oracle 10g express edition and i can make tables and all that in the sql statement box.....go me.....
    BUT - from what i understand i need to create a script in order to download a .sql file that contains have to be pretty....i just want something to take in on monday morning so i can talk to my tutor about it all....
    but i cant seem to make a script...i give it a name and then thats it....i cant do anything else....i cant input code or anything....
    can you not create scripts in the express (free) edition????? or am i doing this wrong?
    please can someone help....im actually bricking it about this assignment, (for any americans out there that means im sh***ing myself about it) i swear its giving me Grey hairs!! AHHHHH
    while im here.....can i create relationships between tables in oracle? or do i do that after in access?
    and can i set it so there are different users of the database? and restrict access to tables depending on what password you put in??? (if that makes sense) if so, how? (in sql)
    finally and decent tutorials i can use? (the creating a script one doesnt help because it doesnt work!!!)
    thanks in advance!! - again i apologise if ive made a fool out of myself and have done everything wrong....ive only been using this program for about 3 days!!!

    Re: Why cant i create a script???? help!!!
    This is exactly what I get
    Have you had any luck getting the editor to work?
    1. I created a file with notepad to upload. test.sql
    2. It loaded OK, the edit icon appeared in the editor page but after clicking on it I got nothing just put me back to blank green screen ready to upload or create????.
    Is there an editor plugin you can configure somewhere or is this a feature?
    Phil
    Edited by: user599432 on 10/12/2008 15:01
    Edited by: user599432 on 10/12/2008 15:30
    It turns out its a Firefox browser problem-------> I used IE7 and it worked

  • Create DB Script error

    Hello,
    i am trying to perform my first manual creation of a database. Initially was always receiving error;
    ORA-01092: ORACLE instance terminated. Disconnection forced
    I think this was because the UNDO element in the init.ora file did not match UNDO element in the Create DB script. But now that i think i have them matching i continously receive the error;
    'Invalid Create Command'
    The UNDO element in the init.ora file is;
    undo_tablespace=UNDOTBS
    The Create script is;
    CREATE DATABASE Customers
    USER SYS IDENTIFIED BY CUSTSYS
    LOGFILE GROUP 1 ('F:\oracle\oradata\Customers\redo01.log') SIZE 100M REUSE,
         GROUP 2 ('F:\oracle\oradata\Customers\redo02.log') SIZE 100M REUSE,
         GROUP 3 ('F:\oracle\oradata\Customers\redo03.log') SIZE 100M REUSE
    MAXLOGFILES 5
    MAXLOGMEMBERS 5
    MAXLOGHISTORY 1
    MAXDATAFILES 100
    MAXINSTANCES 1
    ARCHIVELOG
    CHARACTER SET WE8MSWIN1252
    NATIONAL CHARACTER SET AL16UTF16
    DATAFILE 'F:\oracle\oradata\Customers\system01.dbf' SIZE 200M REUSE
    UNDO TABLESPACE UNDOCUST
    DEFAULT TEMPORARY TABLESPACE tempcust_ts;
    Also, when i have created the service for the database using ORADIM the alert log gives the following near the bottom;
    ORA-00202: controlfile: 'F:\oracle\oradata\Customers\CUSTCONTROL01.CTL'
    ORA-27041: unable to open file
    OSD-04002: unable to open file
    O/S-Error: (OS 2) The system cannot find the file specified.
    Thanks in advance

    I just about give up!!!
    Thanks for everyone’s advice, but nothing so far seems to create the database. I could initially create a database with the Database Configuration Assistant no problem but have been asked to learn to create one manually as it supposedly gives better control of the parameters etc.
    I am using Oracle 9i.
    Next here is the undo elements in init file. (I don't think i can put whole init file up)
    undo_management=AUTO
    undo_retention=10800
    undo_tablespace=UNDOTBS1
    I manage to create the database service okay using ORADIM.
    The alert log file is there at this point but with this error at the bottom.
    ORA-00202: controlfile: 'F:\oracle\oradata\Customers\CUSTOMERSCONTROL01.CTL'
    ORA-27041: unable to open file
    OSD-04002: unable to open file
    O/S-Error: (OS 2) The system cannot find the file specified.
    Tue Aug 22 11:07:51 2006
    ORA-205 signalled during: alter database mount exclusive...
    Shutting down instance (abort)
    I then attempt to create a password file using ORAPWD;
    But i am given an error at command prompt;
    OPW-00001: Unable to open password file
    I then change ORACLE_SID to the new database.
    I then log onto Oracle as sysdba. Says ‘connected to an idle instance’.
    I call start up to init file. I am given following information;
    ORACLE instance started.
    Total System Global Area 135338868 bytes
    Fixed Size 453492 bytes
    Variable Size 109051904 bytes
    Database Buffers 25165824 bytes
    Redo Buffers 667648 bytes
    I then call the SQL script containing the following;
    CREATE DATABASE Customers
    USER SYS IDENTIFIED BY CustSYS
    USER SYSTEM IDENTIFIED BY CustSYSTEM
    CONTROL FILE REUSE
    LOGFILE GROUP 1 ('F:\oracle\oradata\Customers\redo01.log') SIZE 100M REUSE,
         GROUP 2 ('F:\oracle\oradata\Customers\redo02.log') SIZE 100M REUSE,
         GROUP 3 ('F:\oracle\oradata\Customers\redo03.log') SIZE 100M REUSE
    MAXLOGFILES 5
    MAXLOGMEMBERS 5
    MAXLOGHISTORY 1
    MAXDATAFILES 100
    MAXINSTANCES 1
    ARCHIVELOG
    CHARACTER SET WE8MSWIN1252
    NATIONAL CHARACTER SET AL16UTF16
    EXTENT MANAGEMENT LOCAL
    DATAFILE 'F:\oracle\oradata\Customers\system01.dbf' SIZE 200M REUSE
    UNDO TABLESPACE UNDOTBS1 DATAFILE 'F:\oracle\oradata\Customers\UNDOTBS1.dbf'
    DEFAULT TEMPORARY TABLESPACE temp_ts TEMPFILE 'F:\oracle\oradata\Customers\temp01.dbf';
    Error says:
    CONTROL FILE REUSE
    ERROR at line 4:
    ORA-02165: invalid option for CREATE DATABASE
    Also in the alert log more information has been added with the last appending being;
    starting up 1 shared server(s) ...
    starting up 1 dispatcher(s) for network address '(ADDRESS=(PARTIAL=YES)(PROTOCOL=TCP))'...
    Oracle Data Guard is not available in this edition of Oracle.
    I remove the line CONTROL FILE REUSE from script and run again, then receive this message;
    CREATE DATABASE Customers
    ERROR at line 1:
    ORA-01092: ORACLE instance terminated. Disconnection forced
    Also, now after all these attempts I tried making a new database again using DB Configuration Assistant and it now asks me to specify a template of type data_warehousing when I clicked on General_purpose. It states template file specified does not exist, supplying the following information;
    {ORACLE_HOME}\assistants\dbca\templates\Data_Warehouse.dfj
    Thanks to all for input on this but I am running out of time and have to move on to next part of project.

  • Help creating a script for backup

    Hi everybody,
    I would like to make some backups using rman and recovery flash area on oracle10g on my Debian.
    I would like to make a full backup level 0 on Sunday and make incremental backups from Monday to saturday.The best would be to have one for hot backup and one for cold backups.
    But I am wondering how to schedule a task using rman. For example is it possible to write a script that would make the backups at a desired time executed by oracle?
    Or do I have to create a script on unix that should be executed by cron?
    You know I am really bad at scripting, but it would really help me if you could help me creating a script that would make the backup automatically on sunday at midnight and incremental eveydays until sunday.Here is the information I need to put in a script:
    #flash recovery area creation under sqlplus
    SQL> ALTER SYSTEM SET DB_RECOVERY_FILE_DEST_SIZE = 10g SCOPE=BOTH SID='*';
    SQL> ALTER SYSTEM SET DB_RECOVERY_FILE_DEST = '/home/oracle/flash_recovery_area' SCOPE=BOTH SID='*';
    #setting the default variable
    ORACLE_SID=iscream;
    #connect to target database:
    rman TARGET SYS/oracle@iscream NOCATALOG
    #set the defaults values for rman
    CONFIGURE DEFAULT DEVICE TYPE TO DISK;
    CONFIGURE DEVICE TYPE DISK BACKUP TYPE TO COMPRESSED BACKUPSET;
    CONFIGURE CONTROLFILE AUTOBACKUP ON;
    CONFIGURE RETENTION POLICY TO RECOVERY WINDOW OF 7 DAYS;
    CONFIGURE RETENTION POLICY TO REDUNDANCY 2;
    CONFIGURE BACKUP OPTIMIZATION ON;
    Any help will be appreciated
    synthese
    hot backup
    using rman
    using flash_recovery_area
    full backup set compressed on sunday
    incremental backup set compressed from mondy to saturday
    using disk
    policy retenttion 7 days
    redondance 2

    You can backup using some unix shell scripts.
    rman is not really good one.

  • Ihave created a script, i need to email in pdf format.

    Hi Experts,
    There are 2 criterias...
    1. criteria
    I have created a script, i need to mail it. Please give me a step by step guide to perform it .. . Please give the comments in all the functional module to be used.
    Do we have to write a separate program to send email or in the same program. i'll post my program along with this mail. I'm using this program to display report after delivery on that particular date.
    REPORT  ZREPORTTOEMAIL LINE-SIZE 400.
    data : count, i  type i.
    TABLES :  VBFA,         "Sales Document Flow
              VBAK,
              KNA1,
              VBKD,
              VBAP,
              LIPS,
              LIKP,
              KONP,
              KOMK,
              KOMP,
              zkna1,
              konv.
    data : l_vbeln like vbfa-vbeln,
           l_posnr like vbfa-posnn,
           l_KNUMV like vbak-KNUMV,
           L_BILL_ITEM LIKE vbfa-posnn ,
           l_netwr like vbrp-netwr,
           l_MWSBP like vbrp-mwsbp.
    DATA: BEGIN OF TKOMV OCCURS 50.
            INCLUDE STRUCTURE KOMV.
    DATA: END OF TKOMV.
    DATA: BEGIN OF TKOMVD OCCURS 50.
            INCLUDE STRUCTURE KOMVD.
    DATA: END OF TKOMVD.
    TYPE-POOLS: SLIS.
    DATA: FIELDTAB TYPE SLIS_T_FIELDCAT_ALV,
          HEADING  TYPE SLIS_T_LISTHEADER,
          LAYOUT   TYPE SLIS_LAYOUT_ALV,
          EVENTS   TYPE SLIS_T_EVENT,
          REPNAME  LIKE SY-REPID,
          F2CODE   LIKE SY-UCOMM VALUE  '&ETA',
          G_SAVE(1) TYPE C,
          G_EXIT(1) TYPE C,
          G_VARIANT LIKE DISVARIANT,
          GX_VARIANT LIKE DISVARIANT.
    DATA: GT_LIST_TOP_OF_PAGE TYPE SLIS_T_LISTHEADER.
    CONSTANTS: FORMNAME_TOP_OF_PAGE TYPE SLIS_FORMNAME VALUE 'TOP_OF_PAGE'.
    DATA: BEGIN OF itab occurs 0,
            kunnr like likp-kunnr,      "ship to party
            NAME2   LIKE  KNA1-NAME1,   "text
            ORT01   LIKE  KNA1-ORT01,   "City
            BSTNK   LIKE  VBAK-BSTNK,   "customer P O
            BSTDK   LIKE  VBAK-BSTDK,   "date
            vbeln like likp-vbeln,      "delivery
            ernam like likp-ernam,      "person
            vstel like likp-vstel,      "shipping point
            vkorg like likp-vkorg,      "sales org
            lfdat like likp-lfdat,      "delivery date
            kunag like likp-kunag,      "sold to party
            NAME1   LIKE  KNA1-NAME1,   "text
            bil_to like VBAK-KUNNR,
            name3 like kna1-name1,
            traid like likp-traid,      "transport/vehicle no
            BOLNR LIKE LIKP-BOLNR,
            wadat_ist like likp-wadat_ist, "good mov. date
            posnr like lips-posnr,      "item
            matnr like lips-matnr,      "material
            arktx like lips-arktx,      "item text
            matkl like lips-matkl,      "mat group
            werks like lips-werks,      "plant
            lgort like lips-lgort,      "stoage location
            lfimg like lips-lfimg,      "del qty
            MEINS LIKE LIPS-MEINS,
            vrkme like lips-vrkme,      "sales unit
            UMVKZ LIKE LIPS-UMVKZ,
            UMVKN LIKE LIPS-UMVKN,
            charg like lips-charg,      "batch
            vgbel like lips-vgbel,      "reference doc
            mtart like lips-mtart,      "mat type
            vkbur like lips-vkbur,      "sales office
            vkgrp like lips-vkgrp,      "sales group
            vtweg like lips-vtweg,      "Distribution Channel
            spart like lips-spart,      "division
            billno like vbak-vbeln,
            basic like komvd-kwert,
            budat like bkpf-budat,
            fin_amt like vbrp-NETWR,
    END OF itab.
    data : begin of jtab occurs 0,
    kunnr like likp-kunnr,
    name2 like kna1-name2,
    vbeln like likp-vbeln,
    zkunnr like zkna1-zkunnr,
    zname like zkna1-zname,
    end of jtab.
    SELECTION-SCREEN SKIP 1 .
    SELECTION-SCREEN BEGIN OF BLOCK BLOCK1 WITH FRAME TITLE TEXT-003.
    SELECT-OPTIONS   : ABC FOR LIKP-WADAT_IST DEFAULT SY-DATUM
                                  NO INTERVALS   .
    SELECT-OPTIONS   : S_MATNR FOR  LIPS-MATNR NO INTERVALS   .
    SELECT-OPTIONS   : S_VKORG FOR  LIKP-VKORG NO INTERVALS.
    SELECT-OPTIONS   : S_VSTEL FOR  LIKP-VSTEL NO INTERVALS.
    SELECT-OPTIONS   : S_VKBUR FOR  LIKP-VKBUR NO INTERVALS.
    SELECT-OPTIONS   : S_VKGRP FOR  LIPS-VKGRP.
    SELECT-OPTIONS   : S_SPART FOR  LIPS-SPART.
    SELECT-OPTIONS   : S_VBELN3 FOR  LIKP-VBELN.
    SELECT-OPTIONS   : S_MATKL FOR  LIPS-MATKL NO INTERVALS,
                       S_KUNAG FOR LIKP-KUNAG.
    SELECTION-SCREEN  END OF BLOCK BLOCK1.
    select * from likp into corresponding fields of itab
                  WHERE  WADAT_IST IN ABC
                  AND    VBELN IN S_VBELN3
                  AND    VKORG IN S_VKORG
                  and VSTEL in S_VSTEL
                  AND VKBUR IN S_VKBUR
                  and lfart like 'Z%'
                  AND    VBTYP = 'J'
                  AND KUNAG IN S_KUNAG.
    select * from lips into corresponding fields of itab
                    WHERE VBELN =  ITAB-VBELN
                    AND   MATNR IN S_MATNR
                    AND   MATKL IN S_MATKL
                    AND VKBUR IN S_VKBUR
                    AND VKGRP IN S_VKGRP
                    AND SPART IN S_SPART.
    IF ITAB-VRKME = 'RM' AND ITAB-MEINS = 'KG'.
    ITAB-LFIMG = ITAB-LFIMG * ( ITAB-UMVKZ / ITAB-UMVKN ).
    ITAB-VRKME = 'KG'.
    ENDIF.
    SELECT SINGLE BSTNK BSTDK INTO (ITAB-BSTNK,ITAB-BSTDK) FROM VBAK
                     WHERE VBELN = ITAB-VGBEL.
    SELECT SINGLE NAME1 ORT01 FROM KNA1 INTO (ITAB-NAME2,ITAB-ORT01)
                                 WHERE KUNNR = ITAB-KUNNR.
    SELECT SINGLE NAME1 FROM KNA1 INTO ITAB-NAME1
                                 WHERE KUNNR = ITAB-KUNAG.
    *select single vbeln POSNN into (itab-billno,L_BILL_ITEM)  from vbfa where VBELV = itab-vbeln
    *and POSNV = itab-posnr and VBTYP_N in ('M','U').
    select vbeln POSNN from vbfa up to 1 rows into (itab-billno,L_BILL_ITEM)   where VBELV = itab-vbeln
    and POSNV = itab-posnr and VBTYP_N in ('M','U') order by vbeln DESCENDING .
    endselect.
    select single * from vbfa where vbelv = itab-billno and posnv = l_bill_item and
    vbtyp_n = 'N'.
    if sy-subrc = 0.
    clear : itab-billno, l_bill_item.
    endif.
    select single budat from bkpf into itab-budat where xblnr = itab-billno and
    blart = 'RV'.
    select single NETWR MWSBP into (l_netwr, l_MWSBP) from vbrp where vbeln = itab-billno
    and posnr = l_bill_item.
    itab-fin_amt = l_netwr + l_MWSBP.
    clear : l_netwr, l_MWSBP.
    select single kunnr from vbpa into itab-bil_to where
    vbeln = itab-BILLNO and PARVW = 'RE'.
    select single name1 into itab-name3 from kna1
    where kunnr = itab-bil_to.
    *select single VBELV POSNV from vbfa into (l_vbeln,l_posnr)
    *where VBELN = itab-vbeln and
    *POSNN = itab-posnr and VBTYP_N = 'J'.
    *select single VBELN POSNN from vbfa into (l_vbeln,l_posnr)
    *where VBELV = itab-vbeln and
    *POSNV = itab-posnr and VBTYP_N = 'M'.
    select VBELN POSNN from vbfa up to 1 rows into (l_vbeln,l_posnr)
    where VBELV = itab-vbeln and
    POSNV = itab-posnr and VBTYP_N = 'M' order by vbeln DESCENDING.
    endselect.
    select single * from vbfa where vbelv = l_vbeln and posnv = l_posnr and
    vbtyp_n = 'N'.
    if sy-subrc = 0.
    clear : l_vbeln, l_posnr.
    endif.
    if sy-subrc = 0.
    *select single KNUMv into l_KNUMv from vbak where vbeln = l_vbeln
    select single KNUMv into l_KNUMv from vbRk where vbeln = l_vbeln
    select * from konv where knumv = l_knumv and kposn = l_posnr and
    kschl in ('ZR00','ZR01','ZR02','ZOBC').
    itab-basic = itab-basic + KONV-KBETR.
    ENDSELECT.
    else.
    *select single KNUMv into l_KNUMv from ekko where ebeln = itab-vgbel.
    *select single KBETR from konv into itab-basic where knumv = l_knumv
    *and kposn = itab-posnr and kschl = 'P101'.
    select single KNUMv into l_KNUMv from VBRK where VBELN = itab-BILLNO.
    select * from konv where knumv = l_knumv and kposn = l_BILL_ITEM AND
    kschl in ('ZR00','ZR01','ZR02','ZOBC').
    itab-basic = itab-basic + KONV-KBETR.
    ENDSELECT.
    *zkna1-zkunnr = itab-kunnr.
    *insert zkna1.
    endif.
         clear : l_vbeln, L_BILL_ITEM, L_POSNR.
    APPEND ITAB.
    clear : itab-basic, itab-lfimg.
         ENDSELECT.
              clear : itab.
    ENDSELECT.
    <b>perform zscript.</b>
    *&      Form  zscript
          text
    -->  p1        text
    <--  p2        text
    FORM zscript .
    CALL FUNCTION 'OPEN_FORM'
    EXPORTING
      APPLICATION                       = 'TX'
      ARCHIVE_INDEX                     =
      ARCHIVE_PARAMS                    =
      DEVICE                            = 'PRINTER'
      DIALOG                            = 'X'
       FORM                              = 'ZREPORT2EMAIL'
       LANGUAGE                          = SY-LANGU
      OPTIONS                           =
      MAIL_SENDER                       =
      MAIL_RECIPIENT                    =
      MAIL_APPL_OBJECT                  =
      RAW_DATA_INTERFACE                = '*'
      SPONUMIV                          =
    IMPORTING
      LANGUAGE                          =
      NEW_ARCHIVE_PARAMS                =
      RESULT                            =
    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
    IF SY-SUBRC <> 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
            WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
    ENDIF.
    LOOP AT ITAB.
    CALL FUNCTION 'WRITE_FORM'
    EXPORTING
       ELEMENT                        = 'MANU'
       FUNCTION                       = 'SET'
       TYPE                           = 'BODY'
       WINDOW                         = 'MAIN'
    IMPORTING
      PENDING_LINES                  =
    EXCEPTIONS
      ELEMENT                        = 1
      FUNCTION                       = 2
      TYPE                           = 3
      UNOPENED                       = 4
      UNSTARTED                      = 5
      WINDOW                         = 6
      BAD_PAGEFORMAT_FOR_PRINT       = 7
      SPOOL_ERROR                    = 8
      CODEPAGE                       = 9
      OTHERS                         = 10
    IF SY-SUBRC <> 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
            WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
    ENDIF.
    ENDLOOP.
    CALL FUNCTION 'CLOSE_FORM'
    IMPORTING
      RESULT                         =
      RDI_RESULT                     =
    TABLES
      OTFDATA                        =
    EXCEPTIONS
      UNOPENED                       = 1
      BAD_PAGEFORMAT_FOR_PRINT       = 2
      SEND_ERROR                     = 3
      SPOOL_ERROR                    = 4
      CODEPAGE                       = 5
      OTHERS                         = 6
    IF SY-SUBRC <> 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
            WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
    ENDIF.
    ENDFORM.                    " zscript
    The above one is first criteria just to understand how to send mail to the customers.
    <b>Second criteria</b> is i have to send the mail to the particular customer with only their details, the process should continue until it sends to all the customers with their details for that particular date.
    Please help me out.
    I have seen so many posts in the sdn but not able to understand the functional modules, how they declare that and how does it works...
    Please provide me a good material to understand the functional module and to declare them.
    Please solve this query i'll reward them with very good points.
    Thanks in advance.
    A.Rafique.

    Hi babar haroon,
    Thanks for the link.....
    I went through that link, i created smart form but i was not able to get the results because the pgm gets terminated after executing. I'll show u the code, the code is active. Please check out and tell me if  i have missed anything in the code...
    *& Report  ZZZ_TEST3
    REPORT  ZZZ_TEST3.
    *internal table declarations
    data: i_otf type itcoo occurs 0 with header line,
          i_tline type table of tline with header line,
          i_receivers type table of somlreci1 with header line,
          i_record like solisti1 occurs 0 with header line,
    *Objects to send mail.
          i_objpack like sopcklsti1 occurs 0 with header line,
          i_objtxt like solisti1 occurs 0 with header line,
          i_objbin like solisti1 occurs 0 with header line,
          i_reclist like somlreci1 occurs 0 with header line,
    *workarea declaration.
          w_objhead TYPE soli_tab,
          w_ctrlop TYPE ssfctrlop,
          w_compop TYPE ssfcompop,
          w_return TYPE ssfcrescl,
          w_doc_chng typE sodocchgi1,
          w_data TYPE sodocchgi1,
          w_buffer TYPE string,"To convert from 132 to 255
    Variables declarations
          v_form_name TYPE rs38l_fnam,
          v_len_in LIKE sood-objlen,
          v_len_out LIKE sood-objlen,
          v_len_outn TYPE i,
          v_lines_txt TYPE i,
          v_lines_bin TYPE i.
    call function 'SSF_FUNCTION_MODULE_NAME'
    *call function '/1BCDWB/SF00000105'
          exporting
          formname = 'ZZZ_TEST2'
          importing
          fm_name = v_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.
          w_ctrlop-getotf = 'X'.
          w_ctrlop-no_dialog = 'X'.
          w_compop-tdnoprev = 'X'.
         CALL FUNCTION '/1BCDWB/SF00000105'
          EXPORTING
            ARCHIVE_INDEX              =
            ARCHIVE_INDEX_TAB          = itab1
            ARCHIVE_PARAMETERS         =
            CONTROL_PARAMETERS         =
            MAIL_APPL_OBJ              =
            MAIL_RECIPIENT             =
            MAIL_SENDER                =
            OUTPUT_OPTIONS             =
            USER_SETTINGS              = 'X'
          IMPORTING
            DOCUMENT_OUTPUT_INFO       =
            JOB_OUTPUT_INFO            = wa
            JOB_OUTPUT_OPTIONS         =
          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.
    CALL FUNCTION v_form_name
          EXPORTING
          control_parameters = w_ctrlop
          output_options = w_compop
          user_settings = 'X'
          IMPORTING
          job_output_info = w_return
          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.
          i_otf[] = w_return-otfdata[].
          CALL FUNCTION 'CONVERT_OTF'
          EXPORTING
          format = 'PDF'
          max_linewidth = 132
          IMPORTING
          bin_filesize = v_len_in
          TABLES
          otf = i_otf
          lines = i_tline
          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.
          Convert PDF from 132 to 255.
          LOOP AT i_tline.
          Replacing space by ~
          TRANSLATE i_tline USING '~'.
          CONCATENATE w_buffer i_tline INTO w_buffer.
          ENDLOOP.
    Replacing ~ by space
          TRANSLATE w_buffer USING '~'.
          DO.
          i_record = w_buffer.
          Appending 255 characters as a record
          APPEND i_record.
          SHIFT w_buffer LEFT BY 255 PLACES.
          IF w_buffer IS INITIAL.
          EXIT.
          ENDIF.
          ENDDO.
          Refresh: i_reclist,
          i_objtxt,
          i_objbin,
          i_objpack.
          clear w_objhead.
          Object with PDF.
          i_objbin[] = i_record[].
         DESCRIBE TABLE i_objbin LINES v_lines_bin.
          Object with main text of the mail.
          i_objtxt = 'Find attached the output of the smart form.'.
          APPEND i_objtxt.
         DESCRIBE TABLE i_objbin LINES v_lines_txt.
          i_objtxt = 'Regards,'.
          APPEND i_objtxt.
          i_objtxt = 'J.Jayanthi'.
          APPEND i_objtxt.
          DESCRIBE TABLE i_objtxt LINES v_lines_txt.
          Document information.
          w_doc_chng-obj_name = 'Smartform'.
          w_doc_chng-expiry_dat = sy-datum + 10.
          w_doc_chng-obj_descr = 'Smart form output'.
          w_doc_chng-sensitivty = 'F'. "Functional object
          w_doc_chng-doc_size = v_lines_txt * 255.
          Pack to main body as RAW.
          Obj. to be transported not in binary form
          CLEAR i_objpack-transf_bin.
          Start line of object header in transport packet
          i_objpack-head_start = 1.
          Number of lines of an object header in object packet
          i_objpack-head_num = 0.
          Start line of object contents in an object packet
          i_objpack-body_start = 1.
          Number of lines of the object contents in an object packet
          i_objpack-body_num = v_lines_txt.
          Code for document class
          i_objpack-doc_type = 'RAW'.
          APPEND i_objpack.
          Packing as PDF.
          i_objpack-transf_bin = 'X'.
          i_objpack-head_start = 1.
         i_objpack-head_num = 1.
          i_objpack-head_num = 0.
          i_objpack-body_start = 1.
          i_objpack-body_num = v_lines_bin.
          i_objpack-doc_type = 'PDF'.
          i_objpack-obj_name = 'Smartform'.
          CONCATENATE 'Smartform_output' '.pdf'
          INTO i_objpack-obj_descr.
          i_objpack-doc_size = v_lines_bin * 255.
          APPEND i_objpack.
          Document information.
          CLEAR i_reclist.
          e-mail receivers.
         i_reclist-receiver = '[email protected]'.
          i_reclist-receiver = '[email protected]'.
          i_reclist-express = 'X'.
          i_reclist-rec_type = 'U'. "Internet address
          APPEND i_reclist.
          Sending mail.
          CALL FUNCTION 'SO_NEW_DOCUMENT_ATT_SEND_API1'
          EXPORTING
          document_data = w_doc_chng
          put_in_outbox = 'X'
          TABLES
          packing_list = i_objpack
          object_header = w_objhead
          contents_hex = i_objbin
          contents_txt = i_objtxt
          receivers = i_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.
          ENDIF.
    Please reply me back, it is very urgent..
    Thanks and regards.
    A.Rafique

  • How to create a scripting language in java?

    Hello,
    All that I want to do is to create a scripting language in java. I�m familiar with javacc, jsr223 and other things but don�t know how to start. The language syntax is java 5 syntax with some change and I want to generate java source code from small scripts. In fact I don�t know how other languages (like groovy) are created.
    I hope you can show me the required steps.
    Looking forward to hear from you.
    Thanks.

    That's all, huh?
    For a start, generally when I hear "scripting language" I'm thinking interpretter, not a system which creates compiled (or compilable) code.
    I get the impression that what you're talking about is what I'd call a "preprocessor" language, some extra syntax added to java which the preprocessor renders into ordinary java.
    As far as complexity is concerned, much depends on how deeply involved the extra syntax is with the embedded ordinary Java. Does you preprocessor need to understand the java, or is it just embedded as text? How easilly identified are your preprocesor statments? It's a lot easier to do this if preprocessor lines are instantly identifiable from Java code (e.g. start with a #).
    Basically the stages are always the same;
    1) Lexical analysis i.e. picking out words, operators, numbers, quoted strings.
    2) Construct a syntax tree.
    3) Generate code (in this case Java).
    Now, in this case, some of the nodes in the syntax tree may simply be chunks of undigested Java.

  • How do I create a script to do this?

    I have a photoshop file with several layers...about 100. I want to put each layers into it's own group. The name of the group must be the same as the name of the layer.
    I tried creating a action to do this but it did not work right. It only works for one layer selected individually. If I select multiple layers, then it forms nested groups.
    I was told that I can't do this using an action and I would need a script for this.
    How do I create this script?
    I am using adobe photoshop cs6 ( I think) , windows 7.

    This assumes that none of the layer are already in layerSets( group ) and none have layer locking.
    if(app.documents.length>0){
        var doc = app.activeDocument;
        while(!doc.artLayers[0].isBackgroundLayer && doc.artLayers.length>0  ){
            var newSet = doc.layerSets.add();
            newSet.name = doc.artLayers[0].name;
            doc.artLayers[0].move(newSet,ElementPlacement.INSIDE);

  • Cw 9.5 for creating plugins for adobe indesign cs2 in mac 10.4.8

    i am new to plugin creations.please anyone give me an basic idea of creating plugins for adobe indesign cs2.
    and how to debug the plugin, how to create it using code warrior 9.5, if any one know the site reference please inform me.
    thanks in advance
    subha

    i am new to plugin creations.please anyone give me an basic idea of creating plugins for adobe indesign cs2.
    and how to debug the plugin, how to create it using code warrior 9.5, if any one know the site reference please inform me.
    thanks in advance
    subha

  • Create a script to save multiple groups into seperate png files

    Hello,
    I want to use a script to save every group I made into a '.PNG. I'm visualizing something like this, but the outputformat/name doesn't matter, as long it is a output from a group:
    group1 -> 1.png
    group2 -> 2.png
    group3 -> 3.png
    group4 -> 4.png
    etc.
    I noticed that someone create a script like that, but it isn't using for me anymore. Find here the script that isnt working for me:
    Re: Export Groups to Files?
    I am using Photoshop CC 2014 on Windows 7 (64bit).
    Looking forward to your reply! Thanks.
    Kind regards,
    Joost

    Which code cpu you use and what does
    but it isn't using for me anymore.
    mean exactly?

  • Would like to create a script for list all elements and structure of an indesign document

    Hello everybody,
    I'm a very beginner in indesign scripting.
    I would like to create a script in order to list all elements and the inner structure of a n indesign document.
    The aim for me is to understand how elements are sorted and arranged into indesign, and be able to find an specific element by its item name.
    The output document could be an xml or txt document with a treeview structure.
    I would like have a rough idea of which kind of javascript code I should use for that.
    Thanks for answers.

    Hi Ossydoc,
    You can use Muse to create such a website. All you need to do is, create links in Muse for the sermons and select  " link to File " in the hyperlink option and link to those Mp3 files.
    Please refer to this screenshot :- http://prntscr.com/4xvdup
    Now, when you publish your site,  Muse would automatically upload those files onto the server and the users would then be able to listen as well as download those sermons using the links on your site.
    Hope this helps
    Regards,
    Rohit Nair 

  • Why do vector lines appear different in my Photoshop document compared to the PDF that was created using "Scripts Layer Comps to PDF"? And how do I get them to look the same?

    Why do vector lines appear different in my Photoshop document compared to the PDF that was created using "Scripts > Layer Comps to PDF"? And how do I get them to look the same?

    BOILERPLATE TEXT:
    If you give complete and detailed information about your setup and the issue at hand, such as your platform (Mac or Win), exact versions of your OS, of Photoshop and of Bridge, machine specs, what troubleshooting steps you have taken so far, what error message(s) you receive, if having issues opening raw files also the exact camera make and model that generated them, etc., someone may be able to help you.
    Please read this FAQ for advice on how to ask your questions correctly for quicker and better answers:
    http://forums.adobe.com/thread/419981?tstart=0
    Thanks!

Maybe you are looking for

  • Flashplayer will not install in windows 7, 32 bit.  why is that?

    Have tried and tried to get flashplayer update to install.   I continue getting message I must exit Internet Explorer.  Sometimes it appears it has installed (FINALLY), but then everytime I try to view files using it, get a message I must install it.

  • Firewire port for p7 1455

    Hi there, I'm wondering which fire wire port is compatible with the Pavilion P7-1455? thank you!

  • Do I need to keep my apps on my Mac in iTunes if they are now in iCloud?

    Can't I throw out all those apps that are on my MacBook pro taking up hard drive space if I am now using iCloud and getting all my updates over the air to each of my IOS devices? Is there any reason to keep them on the Mac?

  • HELP PLEASE My NEW iPod Shuffle wont play

    My computer recognizes the iPod, so does ITunes, it says its transferring my songs but when I try to play them the iPod just flashes the error green orange green orange green. I tried to "re-set it" but it just wont play any songs. If I plug it in my

  • Releasing a checked out license

    After checking out a floating license (e.g. Control, Optimization), how does one release the license so that it becomes available to other users?