Suggestion on Code

Hi,
   here i am doing duplicate name check so for that i used
Function module as
  call function 'Z_DUPLICATE_CHECK'
      exporting
        lv_first = lv_name2
        lv_last  = lv_name1
        lv_email = lv_email_id
     lv_tel   = lv_tel
      importing
        flag     = lv_flag.
  if sy-cprog = 'SAPMHTTP'.
    zl_bp_head_bspwdcomponent_impl=>zduplicate_check  =  lv_flag.
    zl_bp_head_bpheadoverview_impl=>bp_present  = lv_flag.
    if lv_flag  = 'X'.
ls_et_return-type       = 'E'.
ls_et_return-id         = 'ZCRM'.
ls_et_return-number     = '001'.
ls_et_return-message    = 'Business Partner already exists'.
append ls_et_return to et_return.
clear : ls_et_return.
      return.
IN Z_Duplicate_check i am writing the coding as
  select  c~partner into
      corresponding fields of table t_final1
    from        but000 as c
    inner join  but020 as b on bpartner  = cpartner
    inner join adr6 as a on aaddrnumber   = baddrnumber
    where cmc_name1 = lv_last and cmc_name2 = lv_first and a~smtp_addr = lv_email+2(239).
  if sy-subrc = 0.
    flag  = 'X'.
  endif.
so but in this case it does not take the flag value as 'X' Even though i am given same names so i want some clarification on this code and what are all the changes i want to do
Regards
Ravi

Hi,
   It is solved
Regards
Ravi

Similar Messages

  • Hi need to send email with msg pls suggest a code to do so

    hi
    i want to send email to users with a simple message like for eg shipment shipped
    please suggest some code for it how to do it
    regards
    Nishant

    Here is a simple macro to do this.  Obviously this is not generic enough, but it is very easy to tweak this to do whatever you want.
    define send_mail.
      data : header_text(40).
      object_hd_change-objla  = sy-langu.
      read textpool sy-repid into text_tab language sy-langu.
      read table text_tab with key id = 'R'.
      move text_tab-entry to object_hd_change-objnam.
      concatenate text_tab-entry ' Error ' into
      object_hd_change-objdes separated by space.
      object_hd_change-objsns = 'C'.      "SENSITIVITY
      objcont-line = 'The following messages were received:'.
      append objcont.
      clear objcont.
      objcont-line = ' '.
      append objcont.
      clear objcont.
      objcont-line = &1.
      append objcont.
      receivers-recesc = 'B'.            "SAPmail to SAP user
      receivers-recextnam = sy-uname.
      receivers-recnam = sy-uname.
      receivers-sndex  = 'X'.
      receivers-rcdat     = sy-datum.
      receivers-rctim     = sy-uzeit.
      append receivers.
      call function 'SO_OBJECT_SEND'
           exporting
                object_hd_change           = object_hd_change
                object_type                = object_type
           tables
                objcont                    = objcont
                objhead                    = objhead
                objpara                    = objpara
                objparb                    = objparb
                receivers                  = receivers
           exceptions
                active_user_not_exist      = 1
                communication_failure      = 2
                component_not_available    = 3
                folder_not_exist           = 4
                folder_no_authorization    = 5
                forwarder_not_exist        = 6
                note_not_exist             = 7
                object_not_exist           = 8
                object_not_sent            = 9
                object_no_authorization    = 10
                object_type_not_exist      = 11
                operation_no_authorization = 12
                owner_not_exist            = 13
                parameter_error            = 14
                substitute_not_active      = 15
                substitute_not_defined     = 16
                system_failure             = 17
                too_much_receivers         = 18
                user_not_exist             = 19
                x_error                    = 20
                others                     = 21.
      if sy-subrc <> 0.
        write :/ 'Error Sending the Object', sy-subrc.
      else.
        Commit work.
      endif.
    end-of-definition.

  • Suggest plsql code for form security during runtime

    Hi
    I made a project using forms 6I . I created 4 forms in all. I created a Menu item too like create,insert, delete,modify records, reports print etc. Now What I want is “ if user want to enter a particular form he should select appropriate menu item from the menu “ But what I my exact need is if user attempt to enter a form “a small popup dialogue box should be displayed in the middle of the screen and asks for a password” . So I want a pl&sql function or procedure which creates a default password and match the same when the user enterered the same in popup dialogue box and allow or reject the user request.” Please suggest me a full DETAILED PL/SQL CODE FOR THIS PURPOSE. OR ANY FORM 6I FEATURE.
    thanks in advance
    prasanth as.

    The dialog box is part of the ftandard Forms functionality. What you need to do is set up the user account with the password set to EXPIRED and no grace logins. The Admin Guide tells you how to do this.
    Cheers, APC

  • Enhancement Suggestion - Jdeveloper Code Editor

    Hello,
    I would like to make an enhancements suggestion for the JDeveloper code editor. I find the "history" tab of the source editor extremely useful when I'm trying new things and not sure if they would work. This tab helps me revert changes to a last known version. However, I see myself having to identify the previous correct version by date and time, which is kind of dicey. I do see there is also a description column, however, I'm not able to edit the description with a meaningful message that would help identify as last know good version quickly. Hence, my suggestion is that the history tab of the code editor allow the user to add tags / comments against each version for quick identification.
    Hope the Oracle development is listening, and you'll have to excuse me for posting if this forum is the wrong place to make suggestion ( i didn't quite find any feedback feature on the Jdeveloper product page).
    regards,
    Rehan Yusuf

    No problem Timo.
    I don't think it's worth opening an SR for this. It looks like sub-pixel anti-aliasing isn't supported in the JDeveloper Code Editor, which is a shame, because that's the place where it's most needed.
    Michael.

  • Want any suggestion or code

    hi all,
    Please suggest a way or give me some code which will prevent another user from accesing my work unfortunately i share the same user name & password with some people and i cant get a new user name & password as it is some license problem.
    i willbe highly grateful if any body could provide me with a solution if u have any code plz let me know.

    Hi,
    Checkt his sample code which I got from SDN once.
    PROGRAM ZHIDE NO STANDARD PAGE HEADING.
    This program hides any ABAP's source code and protects it with a
    password in this source code.  So the first candidate to be hidden
    should be ZHIDE itself.
    After hiding, you can still run the abap (the load version is intact)
    but it cannot be displayed, edited, traced, transported or generated.
    If the ABAP is not hidden, the program hides it, if it is hidden, it
    unhides it.
    To execute this program, change the user name and password in this
    source code first.
    SELECTION-SCREEN BEGIN OF BLOCK BLOCK.
    SELECTION-SCREEN BEGIN OF LINE.
    SELECTION-SCREEN COMMENT 1(8) PWD.
    SELECTION-SCREEN POSITION 35.
    PARAMETERS: PASSWORD(8) MODIF ID AAA.
    SELECTION-SCREEN END OF LINE.
    PARAMETERS: PROGRAM(8).
    SELECTION-SCREEN END OF BLOCK BLOCK.
    AT SELECTION-SCREEN OUTPUT.
      LOOP AT SCREEN.
        IF SCREEN-GROUP1 = 'AAA'.
          SCREEN-INVISIBLE = '1'.
          MODIFY SCREEN.
        ENDIF.
      ENDLOOP.
    INITIALIZATION.
      PWD = 'PASSWORD'.
    START-OF-SELECTION.
      TABLES: TRDIR.
    User name and passsword check
      IF SY-UNAME <> 'SAP' OR PASSWORD <> 'PASSWORD'.
        WRITE: / 'Wrong password'.
        EXIT.
      ENDIF.
    SAP owned?
      IF NOT PROGRAM CP 'Z' AND NOT PROGRAM CP 'Y'.
        WRITE: / 'Do not hide original SAP programs!'.
        EXIT.
      ENDIF.
    Exists?
      SELECT SINGLE * FROM TRDIR WHERE NAME = PROGRAM.
      IF SY-SUBRC <> 0.
        WRITE: / 'Program does not exists!'.
        EXIT.
      ENDIF.
    Does it have a current generated version?
      DATA: F1 TYPE D, F3 TYPE D.
      DATA: F2 TYPE T, F4 TYPE T.
      EXEC SQL.
      SELECT UDAT, UTIME, SDAT, STIME INTO :F1, :F2, :F3, :F4 FROM D010LINF
                           WHERE PROG = :PROGRAM
      ENDEXEC.
      IF F1 < F3 OR ( F1 = F3 AND F2 < F4 ).
        WRITE: / 'The program has no recent generated version!'.
        EXIT.
      ENDIF.
    Compose a new program name
      DATA: NEW_NAME(8), I TYPE I, J TYPE I.
      NEW_NAME = PROGRAM.
      DO 8 TIMES.
        I = SY-INDEX - 1.
        NEW_NAME+I(1) = '_'.
    Search for acceptable program name variations
        J = 0.
        SELECT * FROM TRDIR WHERE NAME LIKE NEW_NAME.
          J = J + 1.
        ENDSELECT.
        IF J = 1.
          EXIT.
        ENDIF.
        NEW_NAME = PROGRAM.
      ENDDO.
    Cannot generate appropriate program name
      IF J > 1.
        WRITE: / 'Cannot generate appropriate program name'.
        EXIT.
      ENDIF.
    Check if it is already in d010s (already hidden)
      DATA: F5(8).
      EXEC SQL.
        SELECT PROG INTO :F5 FROM D010S WHERE PROG = :NEW_NAME
      ENDEXEC.
      IF F5 IS INITIAL.
    There is no such hidden program, hide it
        EXEC SQL.
          UPDATE D010S SET PROG = :NEW_NAME WHERE PROG = :PROGRAM
        ENDEXEC.
      ELSE.
    There is already a hidden program there, unhide it
        EXEC SQL.
          UPDATE D010S SET PROG = :PROGRAM WHERE PROG = :NEW_NAME
        ENDEXEC.
      ENDIF.
    end of program

  • Need suggestions and code examples

    Hi ,
    I am developing an RMI client/server distributed application. My RMServer is OK and RMIClient too. Recently I have been asked to dynamically fill a Jtable invoched from my RmiClient, i.e, my JForm or JApplet should be filled with data read from a collection or array. Absolute no JDBC. I should have something like : my RMIClient parses an Object and then read its context which are then send to table columns, ect. Does anyone has had such a previous experience or any idea about the best way to make the client -to-JForm data exchange.
    Any code fragment or examples which shows dynamical data loding to a swing (Jtable) is greatly appreciated, as well as any document where I could find information on RMIclient -> forms and dynamical data filing of components is greatly acknowledged.

    There was an extensive thread of discussion on exactly this subject, at an open source project I lead at java.net:
    https://cajo.dev.java.net/servlets/ProjectForumMessageView?forumID=428&messageID=10140
    It even includes source snippets. A project member was able to solve exactly the problem you are bringing up.
    It is certainly worth a look, I hope it can be of value to you.
    John Catherino
    Project Lead
    The cajo project
    https://cajo.dev.java.net

  • Plug in fails to activate and window suggests validation code priated. Repurchased software but cannot get plug in activation. Pop up suggests validation code still not functional but I am not sure.

    I tried to download my old lightroom and for some reason it no longer registered, which I found strange. So I went to the local dealer and he put in Adobe 5, which I thought was a good deed. Yet, as I now try to create a webpage with lightroom photos, I find they do not upload properly--if at all. Upon further research, it turns out that I need some sort of plug in.
    So OK I get the plug in and attempt to attach it's location to the program. The program pops up a box which suggested "commonly used pirated program". Therefore I repurchase this program and download it.
    I try again and it still pops up--pirated version. This time I know it is not since I repurchased the lightroom product yesterday.
    How do I get this plugin to operated? It is crucial to uploading this program to Google.
    Thanks.
    Sam C

    And where did you buy Lightroom 5 from?
    Are you using the same serial number you bought, here are instructions on how to find it depending on the method you used to buy it: Find your serial number quickly

  • Suggest me code

    I have one internal table itab1 with field VBELN KUNNR which contain the sales orders and the customer numbers based on some selection criteria..
            I have another internal table itab2 with fields VBELN POSNR and MATNR (line items) for the above sales orders
    I want to display a report with VBELN and KUNNR from itab1 and POSNR MATNR from itab2 for all the orders in itab1..

    Hi,
      From my understanding, your internal table 1 contain of field VBELN KUNNR, the data inside this table should be unique.  What I mean by unique is there are no duplicate entries for the same VBELN.
       Internal table 2 contain of fields VBELN POSNR and MATNR which is line items data which will consists of more than 1 line item with the same VBELN.
       Below is my suggestion on the coding.
    SORT INTERNAL TABLE 1 BY VBELN. (sort the table first before read table with binary search can be used)
    LOOP at <INTERNAL TABLE 2>.
      READ TABLE <INTERNAL TABLE 1> WITH KEY VBELN = <INTERNAL TABLE 2>-VBELN BINARY SEARCH.
      IF SY-SUBRC = 0.
        WRITE: <INTERNAL TABLE 1>-VBELN, <INTERNAL TABLE 1>-KUNNR, <INTERNAL TABLE 2>-POSNR, <INTERNAL TABLE 1>-MATNR.
      ENDIF.
    ENDLOOP.
    Hope this help.
    Cheers....

  • Suggestions for code formatter

    At work, I've been asked to look into automatic formatting to fit with the company's coding style, which is fairly simple (Sun + C-style braces, break lines after operator, indent case); I'm currently looking at Jalopy from a google search, which has enough parameters to do what we need, but doe anyone have any other recommendations?

    JIndent

  • Company Code Creation (Either Copy or New Creation)

    Hi all
    We are on a Implementation Project got a problem in MM at the Time of GR/IR and our MM consultant said that one of the Standard Table is missing.
    We created the Company code instead copying it from 001.
    Would like to have input on the following
    1.As SAP suggest company code should be copied If some body does not do that what are the area of concern.
    2. If company code is not copied but Created what kind of problem can come during implementation.
    3. How one correct the problem which are going to arise.
    Regard's
    Rahul Jain

    Hi Rahul,
    Material Control Record Table viz. MARV is to be maintained for Allowing company codes in MM.
    So, in T. Code OMSY, Your company code needs to be added along with the period.
    Check this to find whether your problem is solved.
    Regards
    Hari

  • Need suggestion regarding Layout Manager using Swing in Java

    I have developed a swing application where i am having problem with selecting the right layout manager.
    I am attaching the file where it contains the method for addingComponents to the Content Pane. But, the code that i have written
    contains lot of spaces between first panel and second panel and so forth.
    Please suggest.
    <<Code>>
    public void addComponentsToPane(Container contentPane) {
              this.contentPane = contentPane;
    //          File Panel
              JPanel jfile1panel = new JPanel(new FlowLayout(FlowLayout.CENTER));
              JPanel jfile2panel = new JPanel(new FlowLayout(FlowLayout.CENTER));
              JPanel jfile3panel = new JPanel(new FlowLayout(FlowLayout.CENTER));
              JLabel jfile1 = new JLabel("Select File:");
              jtfile1 = new JTextField(50);
              jbfile1 = new JButton("Button1");
              jfile1panel.add(jfile1);
              jfile1panel.add(jtfile1);
              jfile1panel.add(jbfile1);
              jbfile1.addActionListener(this);
              JLabel jfile2 = new JLabel("Select File:");
              jtfile2 = new JTextField(50);
              jbfile2 = new JButton("Button2");
              jfile2panel.add(jfile2);
              jfile2panel.add(jtfile2);
              jfile2panel.add(jbfile2);
              jbfile2.addActionListener(this);
              JLabel jfile3 = new JLabel("Select File:");
              jtfile3 = new JTextField(50);
              jbfile3 = new JButton("Button3");
              jfile3panel.add(jfile3);
              jfile3panel.add(jtfile3);
              jfile3panel.add(jbfile3);
              jbfile3.addActionListener(this);
              //Button Panel
              JPanel jbuttonpanel = new JPanel();
              jbuttonpanel.setLayout(new FlowLayout(FlowLayout.CENTER));
              JButton jbcmd1 = new JButton("Submit");
              JButton jbcmd2 = new JButton("Cancel");
              jbuttonpanel.add(jbcmd1);
              jbuttonpanel.add(jbcmd2);
              jbcmd1.addActionListener(this);
              jbcmd2.addActionListener(this);
              //Content Pane               
              contentPane.setLayout(new BoxLayout(contentPane, BoxLayout.Y_AXIS));
              contentPane.add(jfile1panel);
              contentPane.add(jfile2panel);
              contentPane.add(jfile3panel);
              contentPane.add(jbuttonpanel);
    }

    But, the code that i have written contains lot of spaces between first panel and second panel and so forth.use pack(), see if it makes a difference
    as you're using FlowLayout, make the frame not resizable

  • Code sign failure for Safari 3.1

    I used 1Password to handle web passwords in Safari and was having some problems so I ran its diagnostics which suggested a code signing problem. I reinstalled Safari from the Leopard Install disks and then downloaded the Safari 3.1 updater and ran it. The code signing checked fine after the reinstall, but failed after the Safari 3.1 update. I'm not sure what is wrong. I just ran codesign -vvvv /Applications/Safari.app and saw this:
    /Applications/Safari.app: a sealed resource is missing or invalid
    /Applications/Safari.app/Contents/Resources/CacheController.nib/objects.nib: resource added
    /Applications/Safari.app/Contents/Resources/ErrorConsole.nib/objects.nib: resource added
    /Applications/Safari.app/Contents/Resources/RenderTree.nib/objects.nib: resource added
    /Applications/Safari.app/Contents/Resources/Snippet.nib/objects.nib: resource added
    /Applications/Safari.app/Contents/Resources/ViewTree.nib/objects.nib: resource added
    Obviously, no app (not ServiceScrubber or TechTool or whatever) has been run that would modify the code signature. What could be causing this error?

    This is still the case for 3.1.1.

  • Stable code for Enterpise MPLS

    Folks,
    Could someone suggest stable code for Catalyst 6500 switches (sup 720) for deploying enterprise MPLS?
    Thanks

    Parwal,
    I would recommend you consider one of the Safe Harbor releases.
    To find out more about Safe Harbor, please refer to the following URL:
    http://www.cisco.com/en/US/netsol/ns504/networking_solutions_program_category_home.html
    Hope this helps,

  • I want to run a package link using a macro code .

    If there is a package RUN_CALC under package group COMPANY1 . Then I use the following macro code to run the package :
    Dim EPM As New FPMXLClient.EPMAddInAutomation
    Sub RUN()
    EPM.DataManagerRunPackage "RUN_CALC", "COMPANY1", ""
    End Sub
    There is another set of calculations that is run through package RUN_CALC2 . Now I  have linked the two packages : RUN_CALC1 and RUN_CALC2.
    Now I not getting any suitable macro code to run this package link . Please suggest the code .
    Thanks,
    SHUBHAM

    Hi Shubham,
    1)     Create Package link.
    2)     Set your prompts.
    3)     Run  your package link using Data Manager-->Run Package-->Run Package link
    To run package link through VBA you need unique name of package ID.
    4)     After running package link go to SE16 select table name UJD_LINK_LOG.
    5)     Then system will generate one entry in table UJD_LINK_LOG.
    6)     Copy Unique ID of that package.
    7)     Use that Package ID in the VBA Code.
    Regards,
    Sushant

  • JSP Code Generators

    Can somebody suggest some code generators for JSP.

    See JSF (JavaServer Faces). This may be better suited for you.

Maybe you are looking for

  • I am unable to import photos to my computer from my iphone. I need help!

    Everytime i try and import photos to my computer I get an error message on every single photo. It says "The following error occured while importing 'photoxyz.jpg': The exact error is unknown. Make a note of this error code, which might be useful if y

  • Weather on maps no longer in degrees celcius? help

    for some reason the weather on nokia maps shows temperature in degrees F, it used to be in degrees celcius, how can I get it back to degrees C?

  • How can I over-ride the regional code?

    I buy DVD from different countries. In my Microsoft I could over-ride the regional code. Question: What can I do with my Probook to play DVDs from variious regional codes? Is there a software avaliable or what else can I do? Volker

  • App Server Slow Down

    Hi All, I had posted my query earlier, no one seem 2 hv replied. hopefully someone will this time. Oracle 9iAS admin console takes a long time to load, around 15 mins, and also as much for other tasks as deploying applications etc. Development is jus

  • Calling portal page

    Is there an API call to call a certain portal page? The only way i've found a way of doing this is using the following URL: click here Where _pageid is different for all pages. This is not very clever in case i decide to change the form at a later st