How to achive the functionality of Class.cast method in Java 1.4.2

Hi Everyone!!
Does anyone know of an api or a class that would let you achieve the same functionality of Class.cast method, i am using Java 1.4.2.
Thanks,
Pratik

well i have bunch of code that is written for 1.5,
but it need to be work with 1.4 as well.obviously, but what is your code doing that you need to use Class.cast functionality? There is a relatively specialized use for this method, and I don't see all that many programs using it. It basically allows you to cast to an anonymous object to the class defined by your Class object, which is only necessary if you don't really know what class your Class object represents. I'm not saying there isn't a need for it in some apps, but I'm just curious what you're doing...

Similar Messages

  • How to create search function (af:query) using method in java

    hi All..:)
    i got problem with search custom (af:query), how to create search function/ af:query using method in java class?
    anyone help me....
    thx
    agungdmt

    Hi,
    download the ADF Faces component demo sources from here: http://www.oracle.com/technetwork/testcontent/adf-faces-rc-demo-083799.html It also has an example for creating a custom af:query model
    Frank

  • How to remove the rule or class function in CS5

    i need to know how to remove the rule or class function in CS5  at the bottom of the screen there are two options for formating HTML and Css when i click the HTML it only allows me to change the bold or italics or link something but when i click CSS it allows me to format how i want the paragraph aligned and the text size and font when i click on lets say changing the font size a box comes up asking me to name a rule so it applies it to everything else i type i want to know how to stop tht like edit everything on my own and if i use CS5 here will it be compatible with CS4 or CS3 at my skool plzz help ive been frustrated with this

    If I use CS5 here will it be compatible with CS4 or CS3 at my skool plzz help ive been frustrated with this
    Code is code.   It doesn't matter which product you use.
    i need to know how to remove the rule or class function in CS5
    You can't.  DW encourages you to use good coding methods, which means using CSS classes and to keep content (HTML) separate from styles (CSS).  For example, if you change font-size on p tags like so:
         p {font-size: 38px}
    Every paragraph will have 38px sized text.
    If you want to apply a special style to just a portion of your text, you must define a CSS class name like so:
    .foo {
    font-size: 38px;
    color: red;
    HTML:
    <p>This is normal paragraph text <span class="foo"> And this is very big and red.</span></p>
    This is normal paragraph text And this is very big and red. 
    Nancy O.
    Alt-Web Design & Publishing
    Web | Graphics | Print | Media  Specialists 
    http://alt-web.com/
    http://twitter.com/altweb
    Message was edited by: Nancy O.  -- unfortunately, this forum doesn't support Raw HTML with inline styles. You'll need to paste my code examples into your DW page to see the effect.

  • How to get the function name in controller class

    Hi experts ,
    I am new to the OAF framework.
    i have created the two functions and bot he the function have the same controller class .i want to capture the function name or function id in the controller class.
    can you please let me know how to get the function id or function name in the controller class.

    Hi apurba,
    Thanks for the quick reply.
    i am trying to get the function name from the FunctionSecurity class,
    However in FunctionSecurity class there is no such method defined as getFunctionName();
    my requirement is ,i have two functions functionA and functionB defined.
    both the function has the same controller class.in controller class ,i need to get the function name ,based on the function name
    i will redirect the page to respective page.
    looking forward for you response.
    appreciate your help
    Thanks,
    KT

  • How to extend the JVue applet class using ActiveX Control

    My SR recommendation was to post this here:
    ) How to Extend the JVue Applet class
    This is the preferred solution. However, when using the ActiveX control, my derived JVue class that is specified in autovue.properties is not being instantiated.
    Your ActiveX bridge looks like it's hard coding a "new JVue()" which means I have no integration hook using the ActiveX control.
    To reiterate, if I extend JVue to add functionality and specify it in the autovue.properties, it is picked up when I run it standalone but if I use the ActiveX component, it is not being picked up.
    I have already read all the documentation, have had web conferences with Mahmood and Jeff Chapman and the engineering staff who recommended this approach as the preferred option.

    We have a need to override certain VueBean/JVue method calls to meet our document handling(documents need to handle metadata information and hence change the document loading cycle, ie markup loading/XRef resolution is dynamic). Also the invokeAction/invokeSubAction do not allow parameter passing(which we have requirements for certain actions again due to metadata) so we would like to override the invokeAction method to include custom processing(we will encode the action with parameters).
    We are already using Custom VueActions for other simpler UI event handling that don't have parameter requirements.
    As I said above, these use cases were relayed to the engineering team and senior staff members in early December and we were told that we could proceed with overriding the main class in the autovue.properties file. I have SR(s) opened with a long thread detailing this so I really don't want to go through this again.
    A custom VueAction does not seem to work because it binds to late in the object call/event stream.

  • How to extend the functionality of Smtp through servlets

    hi
    will some one tell me how to extend the functionality of SMTP server through servelts
    bye

    [samreenkazi],
    Here's some code that might help you get a servlet to send e-mails out by using the sun.net.smtp.SmtpClient class:
    import java.io.*;
    import javax.servlet.*;
    import javax.servlet.http.*;
    import sun.net.smtp.SmtpClient;
    public class SendMailMessageServlet extends HttpServlet {
    static final String to = "[email protected]";
            public void doGet(HttpServletRequest req, HttpServletResponse res)
                                            throws ServletException, IOException {
                    res.setContentType("text/html");
                    PrintWriter out = res.getWriter();
                    //grab the values of each field
                    String name = req.getParameter("name");
                    String feedback = req.getParameter("feedback");
                    String mailfrom = req.getParameter("mailfrom");
                    //Notify the sender of his/her feedback
                    out.println("<HTML>");
                    out.println("<HEAD><TITLE>Mail sent successfully</TITLE></HEAD>");
                    out.println("<BODY>");
                    out.println("Your e-mail has been sent successfully");
                    out.println("</BODY></HTML>");
                    //Send an e-mail
                    SmtpClient smtp = new SmtpClient(); //assume localhost
                    smtp.from(mailfrom);
                    smtp.to(to);
                    PrintStream msg = smtp.startMessage();
                    msg.println("To: " + to); // mailers will display the To: address
                    msg.println("From: " + mailfrom); //mailers will display the From: address
                    msg.println("Subject: Hello World !");
                    msg.println();
                    msg.println("Hello World");
                    smtp.closeServer();
    }Note that the sun.net.smtp.SmtpClient class has limited capabilities. A better alternative is to use the JavaMail API and when you download the JavaMail packages, there are some sample example code that may help you.
    HTH.
    Allen Lai
    Developer Technical Support
    SUN Microsystems
    http://www.sun.com/developers/support/

  • How to convert the javasource file(*.class) to execute file(*.exe)?

    How to convert the javasource file(*.class) to execute file(*.exe)?
    thank you!

    Although i have seen a few programs (that are platform specific) that will embed a small jvm into an exe with your class file, it is generally excepted that you cannot create an executable file using java. The JAR executable file is probably the closest your going to get
    Pete

  • How to get the function name/ID  of the current page

    HI,
    I searched the forum and google, but it is not clear on how to get the function name of the current page.
    I have 4 functions in my self service A ,B,C,D (seeded page links ) they all have to go to a page called hhhPG. Based on which function user is clicks I have to show the data in hhhPG.
    so my question is how to get the function name ? I mean I need to know if user click on link A , B, C or D link and came to this page.
    I found below in one forum and also there is getfunctionID in pageContext , but I do not know what to pass to getfunctionid("???") to get value.
    FunctionSecurity funcSecurity = pageContext.getFunctionSecurity();
    Or is there a better way of know where user is coming from ? like geturl....
    Please help, I need this ASAP.
    Thank you.

    Use below to find out how the user came into the page
    FunctionSecurity funcSecurity = pageContext.getFunctionSecurity();
    boolean isFunc1 = funcSecurity.testFunction(funcSecurity.getFunction("YOUR_FUNCTION_SHORT_NAME1"));
    boolean isFunc2 = funcSecurity.testFunction(funcSecurity.getFunction("YOUR_FUNCTION_SHORT_NAME2"));
    boolean isFunc3 = funcSecurity.testFunction(funcSecurity.getFunction("YOUR_FUNCTION_SHORT_NAME3"));
    boolean isFunc4 = funcSecurity.testFunction(funcSecurity.getFunction("YOUR_FUNCTION_SHORT_NAME4"));
    So one of them will be true based on the function the user came in.
    Write your logic based on these flags.
    Regards,
    Peddi.

  • How to use the function module 'HR_ES_FEATURE_BACKFIELD'

    Hi,
    How to use the function module 'HR_ES_FEATURE_BACKFIELD'?
    I need the usage from both technical as well as functional point of view.
    What is the use of this function module and technically how it is to be used to retrieve a feature for a particular employee.

    hey iam from functional side can u be little bit clear of that feature
    thanks
    sikindar

  • Hi fellow apple guys, i have this problem. Hope you can help me. I don't know how to use the function keys (F1 to F12) on my macbook air. Pls help

    Hi fellow apple guys, i have this problem. Hope you can help me. I don't know how to use the function keys (F1 to F12) on my macbook air. Pls help

    Out of the box, to use the function keys as function keys, hold down the fn key when you press the key. Otherwise, you get the picture function on the key. You can reverse this behavior in the Keyboard system prefs.

  • How to use the function module ....

    hi
    how to use the function module ssf_function_module_name in smartforms

    Hi..
    If you are using this Function module, you can get the generated function module name of smartform dynamically. It is good progrmaming practice to get the fucntion module name dynamically because there might be some problems if you are hard coding in program.
    This will return the name of the function module and then from the exporting parameters you can use the fucntion module name to pass parameters to Smartforms.
    Check this link.I am expalining here how to use this function module.
    https://wiki.sdn.sap.com/wiki/pages/pointstab/viewpageversion.action?pageId=36109&version=2
    Calling SMARTFORMS from your ABAP program
    REPORT ZSMARTFORM.
    Calling SMARTFORMS from your ABAP program.
    Collecting all the table data in your program, and pass once to SMARTFORMS
    SMARTFORMS
    Declare your table type in :-
    Global Settings -> Form Interface
    Global Definintions -> Global Data
    Main Window -> Table -> DATA
    Written by : SAP Hints and Tips on Configuration and ABAP/4 Programming
    http://sapr3.tripod.com
    TABLES: MKPF.
    DATA: FM_NAME TYPE RS38L_FNAM.
    DATA: BEGIN OF INT_MKPF OCCURS 0.
    INCLUDE STRUCTURE MKPF.
    DATA: END OF INT_MKPF.
    SELECT-OPTIONS S_MBLNR FOR MKPF-MBLNR MEMORY ID 001.
    SELECT * FROM MKPF WHERE MBLNR IN S_MBLNR.
    MOVE-CORRESPONDING MKPF TO INT_MKPF.
    APPEND INT_MKPF.
    ENDSELECT.
    At the end of your program.
    Passing data to SMARTFORMS
    call function 'SSF_FUNCTION_MODULE_NAME'
    exporting
    formname = 'ZSMARTFORM'
    VARIANT = ' '
    DIRECT_CALL = ' '
    IMPORTING
    FM_NAME = FM_NAME
    EXCEPTIONS
    NO_FORM = 1
    NO_FUNCTION_MODULE = 2
    OTHERS = 3.
    if sy-subrc <> 0.
    WRITE: / 'ERROR 1'.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
    WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
    endif.
    call function FM_NAME
    EXPORTING
    ARCHIVE_INDEX =
    ARCHIVE_INDEX_TAB =
    ARCHIVE_PARAMETERS =
    CONTROL_PARAMETERS =
    MAIL_APPL_OBJ =
    MAIL_RECIPIENT =
    MAIL_SENDER =
    OUTPUT_OPTIONS =
    USER_SETTINGS = 'X'
    IMPORTING
    DOCUMENT_OUTPUT_INFO =
    JOB_OUTPUT_INFO =
    JOB_OUTPUT_OPTIONS =
    TABLES
    GS_MKPF = INT_MKPF
    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.
    <b>Reward points if useful</b>
    Regards
    Ashu

  • How to use the function module /IRM/IPBB_AGREEMENT_CREATE.

    Hi all,
    Please help me how to use the function module /IRM/IPBB_AGREEMENT_CREATE.
    It is a Vistex fuction module which is used to create Sales contract in SAP-Vistex. If anyone has use the function module and do have the sample code please share it.
    Thanks.

    FORM create_agreement TABLES pt_agreement
                                           CHANGING po_agreement .
      CONSTANTS: c_strt_knumh TYPE knumh VALUE '0000000000'.
      DATA: lc_kona  TYPE /irm/s_gkona,
            lc_cbasp TYPE /irm/s_ipcbasp,
          lt_cbapr TYPE /irm/t_ipcbapr,         "Partners
          lc_cbapr TYPE /irm/s_ipcbapr,
          lt_cbadt TYPE  /irm/t_ipcbadt,        "Dates
          lc_cbadt TYPE  /irm/s_ipcbadt,
          lt_cbafs TYPE  /irm/t_ipcbafs,
          lc_cbafs TYPE  /irm/s_ipcbafs,
          lt_cbacn TYPE  /irm/t_ipcbacn,
          lc_cbacn TYPE  /irm/s_ipcbacn,
          lt_cbacl TYPE  /irm/t_ipcbacl,
          lc_cbacl TYPE  /irm/s_ipcbacl,
          lt_cbtpv TYPE  /irm/t_ipagtpv,
          lc_cbtpv TYPE  /irm/s_ipagtpv,
          lt_texts TYPE  text_lh,
          lc_texts TYPE  itclh,
          lt_cbasd TYPE  /irm/t_ipcbasd,
          lc_cbasd TYPE  /irm/s_ipcbasd,
          lc_agreement    TYPE  /irm/s_ipcbasp_doc,
          lc_e_log_number TYPE  balognr,
          lt_messages     TYPE  /irm/t_gprolog.
      DATA: lt_vake      TYPE  cond_vakevb_t,
            lc_vake      TYPE LINE OF cond_vakevb_t,
            lt_konh      TYPE  /irm/t_gkonh,
            lc_konh      TYPE LINE OF /irm/t_gkonh,
            lt_konp      TYPE  /irm/t_gkonp,
            lc_konp      TYPE LINE OF /irm/t_gkonp,
            lt_konw      TYPE  /irm/t_gkonwu,
            lc_konw      TYPE LINE OF /irm/t_gkonwu,
            lt_konm      TYPE  /irm/t_gkonmu,
            lc_konm      TYPE LINE OF  /irm/t_gkonmu,
            lt_komg      TYPE  /irm/t_gkomg_index,
            lc_komg      TYPE LINE OF /irm/t_gkomg_index,
            lt_user_data TYPE  /irm/t_gpraxfu_index,
            lc_user_data TYPE LINE OF /irm/t_gpraxfu_index.
      DATA: lc_updt(1) TYPE c.
      DATA: lc_knumh TYPE knumh.
      DATA: BEGIN OF lc_str_knumh,
             hd(2) TYPE c VALUE '$$',
             inc_num(8) TYPE c,
            END OF lc_str_knumh.
      DATA: blank_agree_key TYPE knuma VALUE '~~~~~~~~~~'.
      FIELD-SYMBOLS <konh_line> LIKE LINE OF lt_konh.
      FIELD-SYMBOLS <konp_line> LIKE LINE OF lt_konp.
      DATA: lc_rule TYPE type_key_rule.
      READ TABLE pt_agreement INTO lc_rule INDEX 1.
    SELECT SINGLE * FROM  kona
            WHERE  vkorg   = lc_rule-vkorg
            AND    vtweg   = '10'
            AND    spart   = '10'
            AND    boart   = 'ZPS1'
            AND    botext  = lc_rule-sap_agkey.
    IF sy-subrc = 0.
       lc_updt = 'U'.
    ELSE.
      lc_updt = 'I'.
    ENDIF.
      LOOP AT pt_agreement INTO lc_rule.
        MOVE sy-tabix TO lc_str_knumh-inc_num.
        CONDENSE lc_str_knumh-inc_num NO-GAPS.
        WHILE lc_str_knumh-inc_num+7(1) = ' '.
          CONCATENATE '0' lc_str_knumh-inc_num INTO lc_str_knumh-inc_num.
          CONDENSE lc_str_knumh-inc_num NO-GAPS.
        ENDWHILE.
        CONCATENATE '$$' lc_knumh INTO lc_knumh.
        MOVE lc_str_knumh TO lc_knumh.
       MOVE c_strt_knumh TO lc_knumh.
        CLEAR: lc_konh, lc_konp, lc_komg.
        MOVE: lc_rule-vkorg    TO lc_komg-komg-vkorg,
              '10'             TO lc_komg-komg-vtweg,
              '10'             TO lc_komg-komg-spart,
              p_waers          TO lc_komg-komg-waerk,
              '1300'           TO lc_komg-komg-bukrs,
              lc_rule-lifnr    TO lc_komg-komg-lifnr,
              lc_knumh         TO lc_komg-knumh,
              lc_knumh         TO lc_konh-knumh,
              lc_knumh         TO lc_konp-knumh,
              lc_rule-datab    TO lc_konh-datab,
              lc_rule-datbi    TO lc_konh-datbi.
        CASE lc_rule-tablnam.
          WHEN 'A701'.                   "Every Agreement will have a A701 rule -
            "Therefore we acn setup the header using A701
            MOVE: 'New       '  TO lc_kona-knuma,
                  lc_rule-vkorg TO lc_kona-vkorg,
                  '10'          TO lc_kona-vtweg,
                  '10'          TO lc_kona-spart,
                  'ZPS1'        TO lc_kona-boart,
                  'C'           TO lc_kona-abtyp,
                  'V'           TO lc_kona-kappl,
                  p_waers       TO lc_kona-waers,
                  lc_rule-knuma_ag TO lc_kona-abrex,
                  'ZPS2'        TO lc_kona-kobog,
                  lc_rule-datab TO lc_kona-datab,
                  lc_rule-datbi TO lc_kona-datbi,
                  lc_rule-sap_agkey TO lc_kona-botext,
                  '1300'        TO lc_kona-bukrs,
                  'I'           TO lc_kona-updkz.
            MOVE: 'New       '  TO lc_cbasp-knuma_ag,
                  'ZPS1'        TO lc_cbasp-boart_ag,
                  p_waers       TO lc_cbasp-waers,
                  'A'           TO lc_cbasp-setl_mth,
                  'B'           TO lc_cbasp-setl_typ,
                  'A2'          TO lc_cbasp-ident,
                  'E'           TO lc_cbasp-setlm,
                  'ZPDA'        TO lc_cbasp-pargr,
                  'X'           TO lc_cbasp-npric,
                  'LF'          TO lc_cbasp-stprl,
                  lc_rule-lifnr TO lc_cbasp-stpar,
                  lc_rule-contract_rev  TO lc_cbasp-rvnum,
                  'I'           TO lc_cbasp-updkz.
            CONCATENATE: blank_agree_key
                   lc_rule-lifnr        INTO lc_konh-vakey.
            MOVE: lc_rule-lifnr TO lc_konp-lifnr.
          WHEN 'A703'.
            CONCATENATE: blank_agree_key
                         lc_rule-kunnr      INTO lc_konh-vakey.
            MOVE lc_rule-kunnr TO lc_komg-komg-kunnr.
          WHEN 'A709'.
            CONCATENATE: blank_agree_key
            lc_rule-zzprodh1  lc_rule-zzprodh2  lc_rule-zzprodh3
                   lc_rule-zzprodh4  lc_rule-zzprodh5 INTO lc_konh-vakey.
            CONCATENATE: lc_rule-zzprodh1  lc_rule-zzprodh2  lc_rule-zzprodh3
                   lc_rule-zzprodh4  lc_rule-zzprodh5 INTO lc_komg-komg-prodh.
          WHEN 'A710'.
            CONCATENATE: blank_agree_key
                lc_rule-matkl   INTO lc_konh-vakey.
            MOVE lc_rule-matkl TO lc_komg-komg-matkl.
          WHEN 'A711'.
            CONCATENATE: blank_agree_key
                 lc_rule-matnr   INTO lc_konh-vakey.
            MOVE lc_rule-matnr TO lc_komg-komg-matnr.
            IF lc_rule-kschl = 'ZPPL'.
              MOVE: 'C'              TO lc_konp-krech,
                    'CAD'              TO lc_konp-konwa.
              lc_konp-kbetr = lc_rule-net_po_price * 1.
            ENDIF.
          WHEN 'A717'.
          WHEN 'A718'.
            CONCATENATE: blank_agree_key
                 lc_rule-zzextwg INTO lc_konh-vakey.
            MOVE lc_rule-zzextwg TO lc_komg-komg-zzextwg.
         WHEN 'A719'.
           CONCATENATE: blank_agree_key
                lc_rule-werks INTO lc_konh-vakey.
           MOVE lc_rule-werks TO lc_komg-komg-werks.
         WHEN 'A721'.
           CONCATENATE: blank_agree_key
                 lc_rule-kunnr lc_rule-werks INTO lc_konh-vakey.
           MOVE: lc_rule-kunnr TO lc_konp-kunnr,
                 lc_rule-kunnr TO lc_komg-komg-kunnr.
          WHEN 'A722'.
            CONCATENATE: blank_agree_key
                         lc_rule-vkbur INTO lc_konh-vakey.
            MOVE lc_rule-vkbur TO lc_komg-komg-vkbur.
          WHEN 'A724'.
            CONCATENATE: blank_agree_key
                          lc_rule-kunnr lc_rule-vkbur INTO lc_konh-vakey.
            MOVE: lc_rule-kunnr TO lc_konp-kunnr,
                  lc_rule-kunnr TO lc_komg-komg-kunnr,
                  lc_rule-vkbur TO lc_komg-komg-vkbur.
        ENDCASE.
        MOVE: 'A'                  TO lc_konh-kvewe,
              lc_rule-tablnam+1(3) TO lc_konh-kotabnr,
              lc_rule-kappl        TO lc_konh-kappl,
              lc_rule-kschl        TO lc_konh-kschl.
        REPLACE ALL OCCURRENCES OF '~' IN lc_konh-vakey WITH ' '.
        APPEND lc_konh TO lt_konh.
        CLEAR lc_konh.
    *--- Add in the KONP.Do we need to add
        MOVE: lc_rule-kappl        TO lc_konp-kappl,
              lc_rule-kschl        TO lc_konp-kschl,
              'G'                  TO lc_konp-krech.
        IF lc_rule-kschl+3(1) = '%'.
          MOVE: 'A'              TO lc_konp-krech,
                '%'              TO lc_konp-konwa.
          lc_konp-kbetr = lc_rule-rebate_perc * 1.
        ENDIF.
        APPEND lc_konp TO lt_konp. CLEAR lc_konp.
        APPEND lc_komg TO lt_komg. CLEAR lc_komg.
      ENDLOOP.
      IF  lc_updt = 'I'.
        CALL FUNCTION '/IRM/IPCB_AGREEMENT_CREATE'
          EXPORTING
          I_MESSAGES_DISPLAY        = ' '
          I_SAVE_MESSAGES           = ' '
          I_COMMIT_WORK             = 'X'
          I_CALL_FROM_WS            = ' '
            is_kona                   = lc_kona
            is_cbasp                  = lc_cbasp
            it_cbapr                  = lt_cbapr
            it_cbadt                  = lt_cbadt
            it_cbafs                  = lt_cbafs
            it_cbacn                  = lt_cbacn
            it_cbacl                  = lt_cbacl
            it_cbtpv                  = lt_cbtpv
            it_texts                  = lt_texts
            it_cbasd                  = lt_cbasd
          IMPORTING
            es_agreement              = lc_agreement
            e_log_number              = lc_e_log_number
          TABLES
            t_messages                = lt_messages
         CHANGING
          CT_VAKE                   = lt_vake
          ct_konh                   = lt_konh
          ct_konp                   = lt_konp
          CT_KONW                   = lt_konw
          CT_KONM                   = lt_konm
           ct_komg                   = lt_komg
          CT_USER_DATA              = lt_usr_data
          EXCEPTIONS
            no_documents_to_process   = 1
            no_authorization          = 2
            creation_failed           = 3
            new_pricing_not_maitained = 4
            OTHERS                    = 5.
        IF sy-subrc <> 0.
    Implement suitable error handling here
        ELSE.
          MOVE: lc_agreement-knuma_ag TO po_agreement,
                lc_agreement-knuma_ag TO lc_kona-knuma.
        ENDIF.
        APPEND LINES OF lt_messages TO gt_messages.
      ELSE.
        MOVE-CORRESPONDING kona TO lc_kona.
      ENDIF.
      LOOP AT lt_konh ASSIGNING <konh_line>.
        MOVE lc_kona-knuma TO <konh_line>-vakey+0(10).
       move '&'           to <konh_line>-knumh+0(1).
      ENDLOOP.
      LOOP AT lt_konp ASSIGNING <konp_line>.
       MOVE lc_kona-knuma TO <konp_line>-vakey+0(10).
        move '&'           to <konh_line>-knumh+0(1).
      ENDLOOP.
      lc_kona-updkz = 'U'.
      lc_cbasp-updkz = 'U'.
      CLEAR lt_messages.
      CALL FUNCTION '/IRM/IPCB_AGREEMENT_CHANGE'
        EXPORTING
        I_MESSAGES_DISPLAY      = ' '
        I_SAVE_MESSAGES         = ' '
        I_COMMIT_WORK           = 'X'
        I_INIT_DATA             = 'X'
          is_kona                 = lc_kona
          is_cbasp                = lc_cbasp
         it_cbapr                = lt_cbapr
         it_cbadt                = lt_cbadt
         it_cbafs                = lt_cbafs
         it_cbacl                = lt_cbacl
         it_cbacn                = lt_cbacn
        IT_FIELDS               =
         it_texts                = lt_texts
       IMPORTING
         e_log_number            = lc_e_log_number
         TABLES
           t_messages              = lt_messages
        CHANGING
          cs_agreement            = lc_agreement
        CT_VAKE                 = lt_vake
          ct_konh                 = lt_konh
          ct_konp                 = lt_konp
        CT_KONW                 = lt_konw
        CT_KONM                 = lt_konm
          ct_komg                 = lt_komg
        CT_USER_DATA            = lt_usr_data
        EXCEPTIONS
          no_documents_to_process = 1
          no_authorization        = 2
          change_failed           = 3
          agreement_locked        = 4
          OTHERS                  = 5.
    IF sy-subrc <> 0.
    Implement suitable error handling here
    ENDIF.
      APPEND LINES OF lt_messages TO gt_messages.
    ENDFORM.                    " CREATE_AGREEMENT

  • How to Use the Function Module 'BAPI_BUSPROCESSND_CHANGEMULTI'

    Dear Experts,
             Can anyone Explain me how to Use the Function Module 'BAPI_BUSPROCESSND_CHANGEMULTI'.My Requirement is i want to change the Partners of the Service Order.It is Very Urgent Requirement Please Help me.
    Thanks & Regards,
    Ashok.

    Hi,
    For service order you can use FM 'BAPI_ACTIVITYCRM_CHANGEMULTI' as it is much easier to use.
    Sample code is below. You can use that:
    "fill the details of partner which is
              "to be added as main partner or in place of Interaction Agent
              wa_partner_new-ref_guid = w_guid_ref.
              wa_partner_new-ref_handle = '0000000000'.
              wa_partner_new-ref_kind = 'A'.
              wa_partner_new-kind_of_entry = wa_partner-kind_of_entry.
              wa_partner_new-ref_partner_handle = '0000'.
              wa_partner_new-ref_partner_fct = 'Z_IA'.
    "wa_partner-partner_no : New partner no.
              wa_partner_new-ref_partner_no = wa_partner-partner_no.
              wa_partner_new-ref_no_type = wa_partner-ref_no_type.
              wa_partner_new-ref_display_type = wa_partner-ref_display_type.
              wa_partner_new-display_type = 'BP'.
              wa_partner_new-no_type = 'BP'.
              wa_partner_new-partner_fct = 'Z_IA'.
    "w_partner_no : Old partner no. which is to be changed
              wa_partner_new-partner_no = w_partner_no.
              wa_partner_new-mainpartner = 'X'.
              INSERT wa_partner_new INTO TABLE it_partner_new.
              wa_partner_newx-display_type = 'X'.
              wa_partner_newx-no_type = 'X'.
              wa_partner_newx-partner_fct = 'X'.
              wa_partner_newx-partner_no = 'X'.
              wa_partner_newx-mainpartner = 'X'.
              INSERT wa_partner_newx INTO TABLE it_partner_newx.
      IF it_partner_new[] IS NOT INITIAL AND it_partner_newx[] IS NOT INITIAL.
        "maintain all changes to be done
        CALL FUNCTION 'BAPI_ACTIVITYCRM_CHANGEMULTI'
          TABLES
            partner  = it_partner_new
            partnerx = it_partner_newx.
        CLEAR : wa_guid1.
        REFRESH : it_guid1.
        wa_guid1-guid = w_guid_ref.
        APPEND wa_guid1 TO it_guid1.
        "save the changes
        CALL FUNCTION 'BAPI_ACTIVITYCRM_SAVE'
          TABLES
            objects_to_save = it_guid1.
        "commit the transaction
        CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'.
      ENDIF.
    Reply fro any further help.
    Please reward points if helpful.
    Regards,
    Ashlesha

  • About HR infotype 0024, How to use the function moudle:RHPP_Q_PROFILE_WRITE

    Hi:
    About HR infotype 0024,As qualification data goes to the OM Infotypes, How to use the function moudle:RHPP_Q_PROFILE_WRITE?
    thank you.

    thank you and the 'BAPI_QUALIPROF_CHANGE' can wok.
    DATA:it_profile_add TYPE bapiqualific_tab OCCURS 0 WITH HEADER LINE,
         it_profile_delete TYPE bapiqualific_tab OCCURS 0 WITH HEADER LINE,
         it_return TYPE bapireturn1 OCCURS 0 WITH HEADER LINE.
    it_profile_add-obj_id = '20000116'.  "Q ID
    it_profile_add-rating = '0001'.      "精通程度
    APPEND it_profile_add.
    CALL FUNCTION 'BAPI_QUALIPROF_CHANGE'
      EXPORTING
        plvar                = '01'
        otype                = 'AP'  "申请者
        sobid                = '00000170' "PERNR NUMBER
    IMPORTING
       return               = it_return
      TABLES
        profile_add          = it_profile_add
        profile_delete      = it_profile_delete
      ERR_PROFILE          =
      CHANGE_PROFILE       =
    READ TABLE it_return WITH KEY type = 'E'.
    IF sy-subrc = 0.
      MESSAGE 'FAILED' TYPE 'I'.
    ELSE.
      MESSAGE 'SUCCESS' TYPE 'I'.
    ENDIF.

  • How to debug the function separately which is added in the package

    Hi Friends, I want to know how to debug the function separately, by taking it from package,. and i dont no where to add begin and end. and dont no how to give input to the function. ANd how to find the error which is detected from production, so i want to find from which statement its failing. So please guide me to proceed further. thanks in advance.

    { FUNCTION fn_get_trail_id (p_incr PLS_INTEGER DEFAULT 1) RETURN PLS_INTEGER IS
    p_trail_id tb_xop_orders_trail.trail_id%TYPE;
    BEGIN
    IF p_incr >= 1 THEN
    SELECT sq_xop_trail_id.NEXTVAL INTO p_trail_id FROM DUAL;
    RETURN p_trail_id;
    ELSIF p_incr = 0 THEN
    SELECT sq_xop_trail_id.CURRVAL INTO p_trail_id FROM DUAL;
    RETURN p_trail_id;
    END IF;
    END;
    -- $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$
    BEGIN
    ppr_openlog('AQ');
    ppr_request_lock(v_cb_handle, v_cb_lock);
    pr_xop_log_errors('AQ: ==== cb started ('||descr.msg_id||') ====');
    my function is like this, how i can i in clude it in declare statement, and how to assign values for that.. and where i have to include "begin".plz help me

Maybe you are looking for