Regarding CLEAR

Hi,
My screen has 100 fields. I want to clear all the fields when I leave that screen.
Do I need to write CLEAR for all 100 fields.... or is there any other simple way for doing this?
Please let me know..
Regards
Sandip

Hi
Create a table with 3 fields 
a) program
b) field
c) value.
In the beginning of the program  set the  program , field and value to the table.
before using the clear  get the data from the table into a internal table and using field symbols try clearing the value of the variable
Hope it may be useful
Regard
Santosh

Similar Messages

  • Regarding clearing strategy in FI-CA

    Hello...
    This is pertaining to clearing strategy in FI-CA, when customer pays an extra amount against invoice it should go as payment on account but it is getting adjusted against next debit line item (i.e installments due for future dates).
    Our requirement is, it should not adjust against next debit line item due but show as payment on account.
    Request you all to share your views for the same.
    Regards,
    Mitesh Sureliya.

    Hi Mitesh,
    The clearing depends on your Clearing Variant. Please check the customizing clearing Variant in SPRO-Financial accounting-Contract A/C -ARAP-Basic Functions-Open Item Mgmt-Clearing Control-Clearing Variants-Define Clrng Variant.
    First you need to check the variant assigned to Clearing type-05 under above path but clicking-Define specification for Clearing Types-Define defaults for Incoming payment.
    Once you find the clearing variant, go to the above said Clearing control menu path and check the clearring steps like Grouping/Sorting/Grouping Rule/End of Clearing steps and make necessary changes to suit your requirement.
    Hope this helps. Thank you.
    Best Regards,
    B.Kartthik.

  • Regarding clearing OF Excise

    Dear all,
                     I have to make a purchase return of the excise goods .I have made a A/P credit memo for that..But how to clear the excise amount that has been passed to the respective BED,Ecess and Hcess account. When am passing the A/P credit memo the interim accounts are credited...But how to clear the amount that has been went to the Respective Excise account.
    Regards,
    Shyam

    Hi Rahul,
                               Thanks for your explanation.But my client is asking that their....exicse value on the same account should be reduced.after making the Purchase return......is there any process for that...or should i make make a JE.
    My scenario.
    Incomin EXcise INvoice
    127014  Excise Duty RG 23A Part-II      953 Dr
    127017  Higher Edu. Cess RG 23A Part-II 10 dr
    127012  Edu. Cess RG 23A Part-II        19 dr
    221044     CenVat Debit Account            INR 25.75 cr
    A/P Invoice
    V001   A .V Infraprojects Pvt. Ltd.  INR 330.90 CR.
    127530 VAT Input 20%                 INR 55.15  DR
    226001 Goods Recieved Not Invoiced   INR 250.00 DR
    221044 CenVat Debit Account          INR 25.75  DR
    A/P Credit Memo
    V001 A .V Infraprojects Pvt. Ltd.  INR -330.90 CR
    127530  VAT Input 20%              INR INR -55.15 DR
    124151  Stock - Raw Materials      INR -250.00 DR
    127052  Cenvat Credit Account      INR -25.75 DR
    What should i do to reduce the excise value or to correct the excide invoice.PLs help me out...........
    Regards,
    shyamsundar.A

  • Regarding clearing of data in table control

    In the module pool program using table control i need to enter data and save it to a customized table. But when i input data and press enter, all data gets cleared from the screen. Also i tried the same by appending into internal table. At that time data is displayed on the screen but all other rows gets inactive. Please provide a solution for this issue.

    Still my problem is not solved. I am posting my PBO And PAI Modules. In the below example it_mat is the table control table and it_ormat is the internal table.
    PBO Modules.
    *&spwizard: pbo flow logic for tablecontrol 'TCMAT'
      module TCMAT_change_tc_attr.
    *&spwizard: module TCMAT_change_col_attr.
      loop at   IT_MAT
           with control TCMAT
           cursor TCMAT-current_line.
        module TCMAT_get_lines.
    *&spwizard:   module TCMAT_change_field_attr
      endloop.
    *&spwizard: output module for tc 'TCMAT'. do not change this line!
    *&spwizard: update lines for equivalent scrollbar
    module TCMAT_change_tc_attr output.
      describe table IT_MAT lines TCMAT-lines.
    endmodule.
    *&spwizard: output module for tc 'TCMAT'. do not change this line!
    *&spwizard: get lines of tablecontrol
    module TCMAT_get_lines output.
      g_TCMAT_lines = sy-loopc.
      READ TABLE IT_ORMAT INDEX SY-STEPL.
      MODIFY IT_MAT FROM IT_ORMAT INDEX SY-STEPL.
    endmodule.
    PAI modules.----
    *&spwizard: pai flow logic for tablecontrol 'TCMAT'
      loop at IT_MAT.
        chain.
          field IT_MAT-MATNR.
          field IT_MAT-MAKTX.
          field IT_MAT-GROES.
          field IT_MAT-ZEINR.
          field IT_MAT-TCQTY.
          field IT_MAT-IBRFLG.
          module TCMAT_modify on chain-request.
        endchain.
        field IT_MAT-CFLG
          module TCMAT_mark on request.
      endloop.
      module TCMAT_user_command.
    *&spwizard: module TCMAT_change_tc_attr.
    *&spwizard: module TCMAT_change_col_attr.
    module TCMAT_modify input.
      MODIFY IT_ORMAT FROM IT_MAT INDEX SY-STEPL.
    endmodule.
    *&spwizard: input modul for tc 'TCMAT'. do not change this line!
    *&spwizard: mark table
    module TCMAT_mark input.
      data: g_TCMAT_wa2 like line of IT_MAT.
        if TCMAT-line_sel_mode = 1
        and IT_MAT-CFLG = 'X'.
         loop at IT_MAT into g_TCMAT_wa2
           where CFLG = 'X'.
           g_TCMAT_wa2-CFLG = ''.
           modify IT_MAT
             from g_TCMAT_wa2
             transporting CFLG.
         endloop.
      endif.
      modify IT_MAT
        index TCMAT-current_line
        transporting CFLG.
    endmodule.
    *&spwizard: input module for tc 'TCMAT'. do not change this line!
    *&spwizard: process user command
    module TCMAT_user_command input.
      OKCODE = sy-ucomm.
      perform user_ok_tc using    'TCMAT'
                                  'IT_MAT'
                                  'CFLG'
                         changing OKCODE.
      sy-ucomm = OKCODE.
    endmodule.

  • Clearing Open Items

    Dear Friends,
    This is an issue regarding clearing of open item.
    When a Business Partner pays an excess amount over the Open invoice items, it should normaly post it as a payment on Account.
    Any excess payment paid by the Customer Consumption Charges are getting settled against the next instalment due, which in turn should not happen. Excess payment made by any Customer against  Bill should reflect as Payment on Account, and should get reflected as Credit amount in his next bill getting generated.
    But in our case, the excess amount is getting adjusted against the Installment plan amount for the next month. The Client needs the excess amount to be shown as payment on account rather than clearing the next  month's installment plan.
    The grouping/sorting settings has been done based on Due date.
    Can anybody throw some light on the same?
    Thanks and Regards,
    Rajesh

    Hi Rajesh,
    I would suggest you to place clearing locks on the individual instalment plan line items until each of them is due based on the individual instalment plan line item due dates.
    So, if in case, excess payment comes in, it will not clear the instalment plan line items which are not due and will sit as payment on account, if there is no other debt against the account.
    Subsequently this will be reflected as excess payment on the customer's next invoice.
    You can place clearing locks during the instalment plan creation using event 3040.
    Hope it solves your query.....
    Thanks,
    Amlan

  • Clearing vendor payment by app after adjust his dues to be recd.

    Hi Experts
    I have scenario regarding clearing of vendor payment thru app
    I have due amount 5000/- to be paid to a vendor (he is also our customer) and his dues are 2000/- to be received. Can we make payment only 3000/- by adjusting his dues thru app. Please tell me settings. After makings settings like "clear vendor" in customer master and clear customer in vendor master while app steps i am not getting message like schedule payment run generated.
    Thanks and Regards
    Bhaskar

    Damn, just ignore my replies
    Vj

  • GL Clearing - JVA - Equity Group issue

    Hi SAP team,
    Would anybody know a solution regarding clearing GL accounts (many years of  FI outstanding open items) which could reflect the correct Equity Group setting (50% - 50%)?
    Problem is that it first started as partnership 50%- 50%, then it changed to 40%-60%, then recently to  30%-70%. (valid to date)
    GL clearing with documents related to partnership 50%-50% are reflecting the recent 30%- 70% partnership instead.
    How can we control the balance before and after clearing between in 50-50% partnership?
    Regards
    Roger

    Thank you Venkata. This is of some use.
    you are correct. Affects master data.
    Master data in this case has already been changed into different EQ Groups. Now, we are facing a request to clear 55.000 open items.
    some items refers to old E Groups, some from current EQ Groups. We are not sure how this clearing (that will only touch recent EQ Gr) will affect the old ones.
    If you ever faced anything like that and knows a way of making the clearing more realistic (i.e. document related to EQ G1 to be cleared and reflect EQ G1....clearing of open items from EQ Gr 2 to reflect on EQ Gr2 and so on.)
    Regards,
    Roger

  • Clearing special GL payments

    Hi Experts,
    I have a confusion regarding clearing customer. When i clear customer down payments against invoice it generates two AB Documents along with RV and DZ. In clearing normal payments it generates one AB. Please clarify.

    Hi,
    Downpayment uses Special GL Indicator. It works changing reconciliation accounting from vendor in invoice creation. Since you have a different Account the system clear it before post normal account.
    Example:
    Downpayment
    PK: 29; SGL "A"; USD 1,000.00
    PK: 50; Bank clearing account; USD USD 1,000.00
    Clearing 50%
    PK: 39; SGL "A"; USD 500.00
    PK: 26; Vendor number; USD 500.00
    The PK 26 document will decrease the Invoice amount to be paid in original Vendor Reconciliation Accounting (not "A" indicator)
    I hope this clears
    regards

  • Clearing date problem

    hi all,
    this question is regarding clearing date of vendor's check run.
    They found out that one vendor from today's check run had a clearing date of 10/23/07 instead of 10/16/07. I checked and all the other payments from today's run had a 10/16/07 clearing date. My understanding is that becoz there was one invoice that was inadvetently posted with a 10/18 date, somehow it caused the payment run to pick up that date. Please advise.
    thanks.

    Check the clearing document. See all the items that are cleared in that document. Look at the posting date of all the documents. Identify the latest posting date of those document. The latest posting date shall be dated 10/23/07 and that is what is picked up as the clearing date.Those that have 10/16 may belong to a different clearing document.

  • Installment plan clearing

    Hello All,
    I have a query regarding clearing of installment plan.
    For example:
    Posting Date    Due Date           Description    Amt
    01.02.2011     20.02.2011         Fees             5000
    01.02.2011     20.02.2011         Interest         200
    01.02.2011     20.03.2011         Interest         100
    01.02.2011     20.04.2011         Interest         50
    These  are the items posted in a customers account
    Based on these items an installment plan is created for 3 months.
    My installment plan would be
    Posting Date    Due Date           Description    Amt
    1.02.2011     20.02.2011         Instalment       1783
    1.02.2011     20.03.2011         Instalment       1783
    1.02.2011     20.04.2011         Instalment       1785
    How will the source item be cleared. In what hierarchy will it clear.
    I need to know, that can we clear partially clear the fees amount and interest based on the due date. If so, how can we achieve it.
    Regards,
    Charvi

    Hi,
    Payment Scheme requests are just statistical items. So when a payment clears a Payment Scheme request, in background SAP creates a down payment request (can be seen in FPL9 under tab down payment requests). This down payment request in turn clears the original debt. The priority is due date of the debt items which can be overwritten by config to give priority based on document types or main/sub trans.
    This answers your second question as well that while original priority is given to due date which in case will clear fees first due on 20.02.2011 but if you want interest to get cleared first, you need to do some enhancements and config to change priorities based on document types or main/sub trans.
    Regards,
    Ravi

  • Clear logs

    Hi Team,
    I have a Question regarding clearing the LOGS,Its been 4
    months we are using ECC6 IDES and till now I didnt clear
    Logs in Database or ABAP dumps .So day by day some
    or the other data is getting added to the  system but I am
    not able to clear unneccessary logs.also day by day Oraarch
    files are also added to the memory .So if you could plz guide
    as per how to delete the logs.Dont tell me Tcodes simply.
    Tell me the Procedure.
    Thankyou.

    HII Praveen,
    I tried to assign the background job but it is asking for
    variants and parameters of a program also for a program
    it is asking for whole ABAP program as a step or
    External command as a step and External program as a
    step.Also target host or Target Server curosysdev_MPE_01
    is not defined in operation type..these kind of errors I am
    experiencing.
    Could you all about Background as per how to put a
    backround job.

  • Getting applets to work in Firefox or IE7!!

    Hi folks.
    I've been reading Jason Hunters excellet book on Java Servlet Programming and become rather stuck on being able to get applets to work in a browser.
    1) I managed to briefly get an Applet to work in IE7. Then things went astray (I say work, because applet initially displayed correctly graphically)
    2) I introduced a bug and tried to redisplay. And haven't been able to recover.
    3) When 2) occurred I swapped over to Firefox, since IE7 doesn't have a Java Console. (& theres no setting to enable it in security settings either)
    4) Then Firefox prompted to download JRE... This was an odd one to me.... Since I already had a Java runtime...
    I got this through downloading file java_app_platform_sdk-5_04-windows.exe
    java -version yeilds:
    Microsoft Windows XP [Version 5.1.2600]
    (C) Copyright 1985-2001 Microsoft Corp.
    C:\Documents and Settings\Jeremy>java -version
    java version "1.6.0_04"
    Java(TM) SE Runtime Environment (build 1.6.0_04-b12)
    Java HotSpot(TM) Client VM (build 10.0-b19, mixed mode)
    C:\Documents and Settings\Jeremy>
    Browser Versions
    IE : is at version 7.0.5730.13
    Firefox started out at 2.0.0.12... Now Firefox didn't seem to detect the JRE
    5) It said additional plugins are required to display the media on this page...
    6) I clicked the button to "Install missing plugins"
    It then presents Plugin Finder Service with "Available Plugin Downloads" of Java Runtime Environment with checkbox ticked.
    7) I clicked "next", at which point it completes saying
    No plugins were installed
    Java Runtime Environment failed with "Manual Install" button...
    Clicking said button gave me executeable xpiinstall.exe from http://sdlc-esd.sun.com
    8) When I ran this it
    a) proceeded to cause Firefox to crash and a report was sent to Mozilla...
    b) created a restore point called "Installed Java (TM) 6 update 5..
    9)So now I went back to IE 7 having given up on Firefox...
    Now it complained about missing classes which I felt sure were in a jar I'd deployed in Tomcat...
    10) I tried to validate my assumptions by looking inside the Jar with Winzip...
    Then I got a pop up with "Java Virtual Machine Launcher" in its title saying..
    "Failed to load Main-Class manifest attribute from cos.jar"
    At this point I realised 8) was the culprit after posting here and looking at possible causes for said pop-up.
    [http://www.artima.com/forums/flat.jsp?forum=1&thread=61427&start=75&msRange=15]
    None of solutions posted there seemed to apply to me
    11) So now I restored to a restore point prior to 8) and though my problems were over
    12) I've since upgraded to Firefox 2.0.0.14. Firefox pushed update to me. Also tried manually uninstalling and downloading file. Still saying missing plugin!!!
    13) I've tried changing my tags in my html from
    APPLET to OBJECT for IE7 or EMBED for Firefox..
    I've validated my APPLET with APPLETVIEWER following advice posted here:
    [http://java.sun.com/docs/books/tutorial/deployment/applet/index.html]
    No tell tale signs appear in Tomcat Console or logs..
    *The only thing that seems weird is codebase tag*
    14) Book I've been reading mentioned putting both html code and applet class in root folder of tomcat
    I've hosted both files here:
    C:\Apps\apache-tomcat-6.0.16\webapps\ROOT
    15) When I test with appletviewer from this folder and codebase set to / appletviewer doesn't find class.
    I think I need to set this so when web browser runs it finds class. Maybe this is the route of my problems.
    What's haunting me here though is placeholder for applet graphic worked at one point!
    I don't recall fussing with codebase attribute of applet tag, yet suddenly things stopped working.
    16) When I tried to verify with appletviewer I had to remove codebase attribute completely to get things to work.
    Here are three versions of html file. Firefox version doesn't seem to be recognized by Appletviewer
    Applet tag version: (BTW have tried with CODEBASE=/ too. This was how it appeared in book, Remember I'm hosting in Tomcat 6.0.16)
    {code}
    <HTML>
    <HEAD><TITLE>Daytime Applet</TITLE></HEAD>
    <BODY>
    <CENTER><H1>Daytime Applet</H1></CENTER>
    <CENTER><APPLET CODE="DaytimeApplet.class" WIDTH=300 HEIGHT=180></APPLET></CENTER>
    </BODY></HTML>
    {code}
    IE Version only
    {code}
    <HTML>
    <HEAD><TITLE>Daytime Applet</TITLE></HEAD>
    <BODY>
    <CENTER><H1>Daytime Applet</H1></CENTER>
    <CENTER><object classid="clsid:8AD9C840-044E-11D1-B3E9-00805F499D93"
    width="300" height="180">
    <param name="code" value="DaytimeApplet.class"></object></CENTER>
    </BODY></HTML>
    {code}
    Firefox version with JRE matching what java -version says precisely and using "jpi-version" so need for download instructions url 'should' be redundant..
    {code}
    <HTML>
    <HEAD><TITLE>Daytime Applet</TITLE></HEAD>
    <BODY>
    <CENTER><H1>Daytime Applet</H1></CENTER>
    <CENTER>
    <embed code="DaytimeApplet.class"
    width="300" height="180"
    type="application/x-java-applet;jpi-version=1.6.0_04"/>
    </CENTER>
    </BODY></HTML>
    {code}
    I don't want to be staring at a placeholder in a Web Browser.
    I want to GUI as it appears in AppletViewer and how it once had it working in IE7!
    You wouldn' t think that was to much to ask for would you! Sorry for length of this post.
    Any clues as to where to go next would be greatly appreciated as I'm pulling hairs out with frustration at the moment...
    A few of footnotes:
    1) I've relaxed my security zone settings for intranet, added localhost to local intranet sites..
    2) I've tried deleting all temporay files in IE7 even to point of resetting to install setup thinking there may be some sort of caching issue with bad applet... No luck
    3) I can still get Glassfish server to login to Admin Console.
    So the integrity of my pc should me intact based on the shenanigans of point 11. Restoring to get rid of second JRE

    paulcw wrote:
    I'm not sure what to tell you. I've never had any trouble installing the JRE and getting applets to work. Maybe it's an IE7 thing. Firefox is usually easier to configure.
    Anyway, it sounds like something that you need to be sitting at your computer to fix, so I don't know how useful a forum will be. It might be best just to ask a coworker with a lot of arcane knowledge to take a look at it.1) Unfortunately I'm learning from home and don't have the luxury of asking a co-worker. Have fired off email to one of folks at Sun..
    In my efforts to try and track down the problem yesterday, Google uncovered some interesting findings regarding Caching of Applets. Thought I'd share this:
    2) [http://www.velocityreviews.com/forums/t603400-ltobjectgt-tag-and-applet-caching.html]
    There is an interesting post some way down posted by james.a.cleland
    Quote:
    "My solution is to x-c in the Java console to clear
    this cache. This works without unloading the JVM and while the applet
    is running. It looks like the browser isn't caching any applets. At
    least my browser cache doesn't contain any, although I do regularly
    use half a dozen, so it must be the JRE. Anyway, clearing through the
    console solves my problem".
    I can't access Java Console in IE7 as you know...
    3) There is always another way to skin a cat regarding clearing cache.
    Found this here:
    [http://www.aurigma.com/Support/DocViewer/28/UpdatingImageUploaderonClientSide.htm.aspx]
    Search for Java section
    Quote:
    "Java applets are stored in the cache that is accessible through the Java control panel. Follow these steps to do it:
    Open Java Plug-in Control Panel. Depending on the platform, it can be found in different locations:
    Windows: Control Panel -> Java Plug-in
    Click the Cache tab.
    Click Clear to clear all cached applets."
    *Problem is that there is no Java Plug-In within Control panel. Mentioned this with Coffee Cup reference above..*
    4) Also saw this article on *"How to troubleshoot Java applet and component download problems"* at:
    [http://support.microsoft.com/kb/241111]
    Java console or output log section:
    Javalog.txt in the windows\java or winnt\java directory
    windows\java contains
    - classes
    - trustdb
    No such file: classes & trustdb are empty folders.
    5) I have same problem mentioned here:
    [http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=915520&SiteID=1]
    Quote:
    "I cannot get java applets to display on any web pages - instead this message appears:
    alt="Your browser understands the <APPLET> tag but isn't running the applet, for some reason." Your browser is completely ignoring the <APPLET> tag! "
    Yep. That's my predicament.
    BTW: Get this by doing test here:
    [http://java.sun.com/products/plugin/1.5.0/demos/applets/Clock/example1.html]
    6) Sun's Verify Installation fails on me too:
    [http://www.java.com/en/download/installed.jsp]
    7) I'm interested in knowing how IE7 caches the applets too. Does it store some sort of class-id in the registry? (I'm on XP SP2)
    8) Is there an installation integrity verifier for Sun? Something that verifies the integrity against a baseline install and reports anomalies.Like I mentioned earlier I've got java_app_platform_sdk-5_04-windows.exe file installed. Not the latest incarnation, but the one immediately before. With SE 1.6.0_04-b12 built built into it

  • Dropdown not working

    Hi Every one...,
    In my Machine dropdown function is not working. example is in T.code like MM01 (Creation of Material Master) I could not able to select Industrial sector, material type, now values are displaying.
    If with same user ID, I could able to select the values and it is working fine. I believe, required to do settings specific to Machine.
    your Helpful answer is more valueable to me.
    regards.

    clearing history is not likely to resolve the issue... unless you delete the MDB file.
    the SAP note I provided will explain the process.

  • Vendor's check run clearind date

    hi all,
    this question is regarding clearing date of vendor's check run.
    They found out that one vendor from today's check run had a clearing date of 10/23/07 instead of 10/16/07. I checked and all the other payments from today's run had a 10/16/07 clearing date. My understanding is that becoz there was one invoice that was inadvetently posted with a 10/18 date, somehow it caused the payment run to pick up that date. Please advise.
    thanks.

    When clearing, the <b>last posting date of all the documents involved</b> in clearing is set as the clearing date.
    A rental invoice for December is entered on 11/28/1997 and the posting date is set to 12/01/1997. The rent is paid on 11/30/1997 and is also posted under this date. 12/01/1997 is then set as the clearing date, in other words the posting date of the invoice.

  • Sending WD component link in email through Workflow

    Hi ,
    I have a Web dynpro component created.The WD application would trigger a Workflow through a Business Object event. In the workflow the user would receive an email on his outlook with the WD component link.
    I have 2 questions:
    1)  How will we send the email to the outlook mail? And the link would be a fairly long string as it is of a WD application.How can we send the link?
    2)  There is 1 more requirement in which there is a inventory number,which is the key field for the WD screen.The person receiving the outlook email with the link will be getting the link as
    eg: http://tcbdci20.xyz.net:8020/sap/bc/webdynpro/xyz/cbb_a4201_invmt?WiNr=4711.
    Here the "WiNr" would be the Inventory number parameter name and "4711" would be the inventory number.This link should directly take the user to the inventory number data filled on the WD screen.
    Is there any way thsis kind of link can be sent and generated?
    Many thanks for your help.
    Regards,
    Ameya Kulkarni

    Hi,
    Please see the below code by which I am able to send link more than 160 charecter.
    *** BEGIN_METHOD SEND_MAIL_TO_USERS CHANGING CONTAINER.
    * Data declaration
    DATA:
          lt_user_IDS type STANDARD TABLE OF SWHACTOR,
          ls_user_IDS type SWHACTOR,
          lt_EMAIL_ADDRESSES TYPE STANDARD TABLE OF ADR6-SMTP_ADDR,
          ls_EMAIL_ADDRESSES  type ADR6-SMTP_ADDR,
          lv_STATUS TYPE CFS_STATUS-STATUS_ID,
          Lv_Object_ID type crmd_orderadm_h-object_id,
          ls_document_data TYPE sodocchgi1,
          lt_text TYPE solisti1 OCCURS 0,
          l_document_data TYPE sodocchgi1,
          lt_receivers TYPE somlreci1 OCCURS 0,
          ls_wa_receive TYPE somlreci1,
          ls_text TYPE solisti1,
          lv_link_title  TYPE char50.
    DATA: lv_link1 TYPE char200 VALUE
    'http://golitsapd39.go-d01.local:8001/sap/bc/gui/sap/its/webgui?sap-',
          lv_link2 TYPE char200 VALUE
    'language=EN&sap-client=850&~transaction=DSWP_SAPSHORTCUT&~OkCode=',
          lv_link3 TYPE char200 VALUE '/08&pcmd=CRMVW&pmsgnum=',
          lv_link  TYPE char200.
    * Get container values
      SWC_GET_table CONTAINER 'User_ids' lt_USER_IDS.
      SWC_GET_table CONTAINER 'Email_addresses' lt_EMAIL_ADDRESSES.
      SWC_GET_ELEMENT CONTAINER 'Status' lv_STATUS.
      SWC_GET_ELEMENT CONTAINER 'Object_ID' lv_Object_ID.
    *=======================================================================
    * Createing final link
    *=======================================================================
    CONCATENATE lv_link1 lv_link2 lv_link3 lv_object_id INTO
                lv_link.
    *=======================================================================
    * createing subject
    *=======================================================================
    Condense  lv_status.
    Translate  lv_status to upper case.
    CASE lv_status.
      WHEN 'NEW'.
        CONCATENATE 'Pls assign Support Msg ' lv_object_id
        INTO ls_document_data-obj_descr SEPARATED BY space.
      WHEN 'AUTHORIZED'.
        CONCATENATE 'CR' lv_object_id 'is autorized'
        INTO ls_document_data-obj_descr SEPARATED BY space.
      WHEN 'CRCREATED'.
        CONCATENATE 'Please authorize' lv_object_id
        INTO ls_document_data-obj_descr SEPARATED BY space.
      WHEN OTHERS.
        CONCATENATE 'Support Msg' lv_object_id
        'is in' lv_status 'status'
        INTO ls_document_data-obj_descr SEPARATED BY space.
    ENDCASE.
    *=======================================================================
    * createing Body
    *=======================================================================
    * Hi
    CLEAR : ls_text.
    ls_text = 'Hi,'.
    APPEND ls_text TO lt_text.
    *Blank Line
    CLEAR : ls_text.
    ls_text = '<br></br>'.
    APPEND ls_text TO lt_text.
    CASE lv_status.
      WHEN 'NEW'.
    *Support Message has been created or reassigned in NEW status.
        CLEAR : ls_text.
        CONCATENATE 'Support Messag' lv_object_id
        'has been created or reassigned to you.'
        INTO ls_text SEPARATED BY space.
        APPEND ls_text TO lt_text.
    *Blank Line
        CLEAR : ls_text.
        ls_text = '<br>'.
        APPEND ls_text TO lt_text.
    *Please raise a CR and waith untill it is aurorized then make the status
    *ASSIGNED to continue further.
        CLEAR : ls_text.
        CONCATENATE
        'Please raise a CR and waith untill it is aurorized then make the'
        'status ASSIGNED to continue further.'
        INTO ls_text SEPARATED BY space.
        APPEND ls_text TO lt_text.
    *Blank Line
        CLEAR : ls_text.
        ls_text = '</br>'.
        APPEND ls_text TO lt_text.
    WHEN 'AUTHORIZED'.
        CLEAR : ls_text.
        CONCATENATE 'CR' lv_object_id 'is authorized.'
        INTO ls_text SEPARATED BY space.
        APPEND ls_text TO lt_text.
    *Blank Line
        CLEAR : ls_text.
        ls_text = '<br>'.
        APPEND ls_text TO lt_text.
    *Please check and make the status of the support message ASSIGNED
    *status to continue further.
        CLEAR : ls_text.
        CONCATENATE 'Please check and make the status of the support'
                    'message ASSIGNED status to continue further.'
        INTO ls_text SEPARATED BY space.
        APPEND ls_text TO lt_text.
    *Blank Line
        CLEAR : ls_text.
        ls_text = '</br>'.
        APPEND ls_text TO lt_text.
    WHEN 'CRCREATED'.
        CLEAR : ls_text.
        CONCATENATE 'CR' lv_object_id 'has been created.'
        INTO ls_text SEPARATED BY space.
        APPEND ls_text TO lt_text.
    *Blank Line
        CLEAR : ls_text.
        ls_text = '<br>'.
        APPEND ls_text TO lt_text.
    *Please check and authorized it.
        CLEAR : ls_text.
        ls_text = 'Please check and authorized it.'.
        APPEND ls_text TO lt_text.
    *Blank Line
        CLEAR : ls_text.
        ls_text = '</br>'.
        APPEND ls_text TO lt_text.
    WHEN OTHERS.
        CLEAR : ls_text.
        CONCATENATE 'Support Message' lv_object_id
        'is in' lv_status 'status now.'
        INTO ls_text SEPARATED BY space.
        APPEND ls_text TO lt_text.
    *Blank Line
        CLEAR : ls_text.
        ls_text = '<br>'.
        APPEND ls_text TO lt_text.
    *Please check and start working as soon as possible.
        CLEAR : ls_text.
        ls_text = 'Please check and start working as soon as possible.'.
        APPEND ls_text TO lt_text.
    *Blank Line
        CLEAR : ls_text.
        ls_text = '</br>'.
        APPEND ls_text TO lt_text.
    ENDCASE.
    *Blank Line
    CLEAR : ls_text.
    ls_text = '</br></br>'.
    APPEND ls_text TO lt_text.
    *Please click the following link to take a action.
    CLEAR : ls_text.
    ls_text = 'Please click the following link to take a action.'.
    APPEND ls_text TO lt_text.
    *inseting link
    CLEAR : ls_text.
    CONCATENATE 'VIEW/EDIT Object' lv_object_id INTO lv_link_title
    SEPARATED BY space.
    CONCATENATE '<A HREF=' lv_link '>'
       INTO ls_text.
    APPEND ls_text TO lt_text.
    CLEAR : ls_text.
    CONCATENATE  '<H5>' lv_link_title '</H5></A>'
    INTO ls_text.
    APPEND ls_text TO lt_text.
    *Blank Line
    CLEAR : ls_text.
    ls_text = '<br></br>'.
    APPEND ls_text TO lt_text.
    *Adding Signature
    *WThanks and regards
    CLEAR : ls_text.
    ls_text = 'Thanks and regards,'.
    APPEND ls_text TO lt_text.
    *Blank Line
    CLEAR : ls_text.
    ls_text = '<br>'.
    APPEND ls_text TO lt_text.
    *WF-Batch
    CLEAR : ls_text.
    ls_text = 'WF-BATCH'.
    APPEND ls_text TO lt_text.
    * Receiver
    Loop at lt_user_IDS into ls_user_IDS.
    ls_wa_receive-rec_type = 'G'.        "SAP User
    ls_wa_receive-receiver = ls_user_IDS. "Mail Address
    APPEND ls_wa_receive TO lt_receivers.
    Endloop.
    Loop at lt_EMAIL_ADDRESSES into ls_EMAIL_ADDRESSES.
    ls_wa_receive-rec_type = 'U'. "Internet User
    ls_wa_receive-receiver = ls_EMAIL_ADDRESSES. "Mail Address
    APPEND ls_wa_receive TO lt_receivers.
    Endloop.
    *This function module is used to send mail
    CALL FUNCTION 'SO_NEW_DOCUMENT_SEND_API1'
      EXPORTING
        document_data              = ls_document_data
        document_type              = 'HTM'
        put_in_outbox              = 'X'
        commit_work                = 'X'
      TABLES
        object_content             = lt_text
        receivers                  = lt_receivers
      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 Mail Send Successful
    IF sy-subrc EQ 0.
      COMMIT WORK.
    *   Push mail out from SAP outbox
      SUBMIT rsconn01 WITH mode = 'INT' AND RETURN.          "#EC CI_SUBMIT
    ENDIF.
    END_METHOD. ***
    Thanks and regards,
    SNJY

Maybe you are looking for

  • Creation of G/L account

    Hi Gurus, There is a requirement to create around 100+ G/L accounts. Txn FS15 & FS16 allow only to copy G/L accounts. Is there any prog / txn that will allow me to create G/L accounts at one go. rgds, nk

  • ? Scale Factor of Imported Graphics

    I've exhausted every possible place I can find an answer, so if it's obvious to you, I apologize, but I have tried. I am going from nearly 20 years in Pagemaker (and Quark) to Indesign. The transition is not intuitive to say the least. My biggest hea

  • Answer Me

    Anyone having issues with this feature turned on?  When receiving a call this only works a fraction of the time?   I have put the phone to my ear, taken it away any put it back and the phone is still ringing.  I have had to swipe the screen to answer

  • Anyone tried to deploy IBM's Java resource adapter for IMS on WLS6.1sp2?

              Has anyone had success or attempted to deploy the IMS Connector           for Java (IBM's resource adapter) on WLS6.1sp2? I would like to           use this to connect WebLogic to IMS via IMS Connect 1.2?           Thanks           Sam     

  • How to delete memory history for SMS on iphone 4

    How do I delete my memory history on my iphone4.  I have used the swipe delete method and the edit delete method--but the message still shows up in my serach spotlight function.  Any help other than a total reset is what im looking for. Thanks