Please check the code for me

DATA :Begin of itab_reqid occurs 0,
      objid like hrp1001-objid,
       end of itab_reqid,
      Begin of itab_postid occurs 0,
       postid like hrp1001-objid,
       end of itab_postid.
Select distinct objid from hrp5125 into table itab_reqid
                                 where aedtm BETWEEN '20060107' and '20073108'.
Select OBJID from hrp1001 into table itab_postid where objid IN itab_reqid
                                                       AND SCLAS = 'NC'.
The above code gives an error called "line type for itab_reqid is incorrect".
Please advise,
Thanks

Hi Reena,
I am not sure if your approach works for ranges. I think the problem in your code is that itab_reqid is not a range and yet you have used it like a range in your SQL SELECT where clause.
You could try this approach instead:
DATA :Begin of itab_reqid occurs 0,
             objid like hrp1001-objid,
           end of itab_reqid,
           Begin of itab_postid occurs 0,
             postid like hrp1001-objid,
           end of itab_postid.
RANGES: r_reqid for hrp1001-objid.
Select distinct objid from hrp5125 into table itab_reqid
where aedtm BETWEEN '20060107' and '20073108'.
if not itab_reqid[] is initial.
  r_reqid-option = 'EQ'.
  r_reqid-sign = 'I'.
  LOOP AT itab_reqid.
     r_reqid-low = itab_reqid-objid.
     append r_reqid.
  ENDLOOP.
  Select OBJID from hrp1001 into table itab_postid where objid IN itab_reqid
     AND SCLAS = 'NC'.
endif.
Kind Regards,
Darwin

Similar Messages

  • Please check the code

    I AM TRYING TO REPLICATE THE ADDRESS OF EQUIPMENT FROM ECC TO CRM.
    I AM ABLE TO REPLICATE THE IDENTIFICATION NUMBER.
    WHILE USING THE SAME FUNCTION MODULE FOR ADDRESS, THE ADDRESS IS NOT GETTING REPLICATED.
    PLEASE CHECK THE CODE AND TELL ME WHAT PRE-REQUISITES MUST BE TAKEN INTO CONSIDERATION AND IS THERE ANY MISTAKE FROM ME.
    FULL POINTS WILL BE REWARDED.
    ITS VERY VERY URGENT.
    METHOD IF_EX_CRM_EQUI_LOAD~ENLARGE_COMPONENT_DATA.
    **Data declarations
    DATA:
        ls_equi          type crmt_equi_mess,
        ls_comp          type ibap_dat1,
        ls_comp_det1     TYPE IBAP_COMP3,
        ls_address_data  type ADDR1_DATA,
        ls_object      type comt_product_maintain_api,
        ls_object1     type comt_product,
        lv_object_id   type IB_DEVICEID,
        lv_object_guid type IB_OBJNR_GUID16.
    **Map Sort field from ECC to CRM
    Read table it_equi_dmbdoc-equi into ls_equi index 1.
    lv_object_id  = ls_equi-equnr.
    move is_object to ls_object.
    move ls_object-com_product to ls_object1.
    lv_object_guid = ls_object1-product_guid.
    move is_component to ls_comp.
    ls_comp_det1-deviceid    = lv_object_id.
    ls_comp_det1-object_guid = lv_object_guid.
    ls_comp_det1-EXTOBJTYP   = 'CRM_OBJECT'.
    ls_comp_det1-ibase       = ls_comp-ibase.
    ls_address_data-roomnumber = '1000'.
    ls_address_data-floor = '10'.
    ls_address_data-country = 'US'.
    CALL FUNCTION 'CRM_IBASE_COMP_CHANGE'
      EXPORTING
       i_comp                       = ls_comp
       I_COMP_DET             = ls_comp_det1
       I_ADDRESS_DATA     = ls_address_data
      I_ADDRESS_ADMIN           =
      I_PARTNER                 =
      I_DATE                    =
      I_TIME                    =
    EXCEPTIONS
      DATA_NOT_CONSISTENT       = 1
      IBASE_LOCKED              = 2
      NOT_SUCCESFUL             = 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.
    ENDMETHOD.

    Hi S B,
    May I the procedure for the replication of serialnumber into device ID that is Identification field In Ibase.
    And one more thing need this to be codded in the standard badi or needed an copy of the implementation .
    plz help me as u already have done the requirement.
    u will be twice rewarded.
    Thanking u in advance for the reply.
    Sree.

  • My phone is miss please check the imei for me thanks

    my phone is miss please check the ime for me thanks.

    Apple does not track phones.
    Contact law enforcement if you believe the device has been stolen.
    If it is merely lost, start looking for it.
    If the "Find My iPhone" feature had been enabled prior to to losing the device, it would be trackable via www.icloud.com

  • Passing values to subreport in SSRS throwing an error - Data Retrieval failed for the report, please check the log for more details.

    Hi,
    I have the subreport calling from the main report. The subreport is based on MDX query agianst the SSAS cube. some dimensions in cube has values 0 and 1.
    when I try to pass '0' to the sub report as the parameter value, it gives an error "Data Retrieval failed for the report, please check the log for more details".
    Actually I am using table for storing these parameter values. In the main report I am calling this table (dataset) and passing these values to subreport.
    so I have given like [0],[1] and this works fine. when I give only either [0] or [1] then it is throwing an error.
    Could you please advise on this.
    Appreciate all and any help.
    Thanks,
    Divya

    Hi Divya,
    Based on the current description, I understand that there is no issue if you pass two values from main report to subreport, while the issue occurs when passing one value to subreport.
    To narrow down the issue, I want to confirm whether the subreport can run if there is only [0] or [1] in the subreport. If so, it indicates the query statements exist error in the subreport. If it’s not the case, this shows the issue occurs during passing
    values from main report to subreport. To make further analysis, please post the details of query statements of the subreport to the forum.
    Regards,
    Heidi Duan
    Heidi Duan
    TechNet Community Support

  • Message 'Please check the destinations for parallel MRP'.

    Hi,
    While I was running MD01, I encountered the following message 'Please check the destinations for parallel MRP'.
    Please advise.
    Thank you in advance.

    Hi,
    In MD01 initial screen indiacate parallel processing indicator.
    In SPRO> PRODUCTION > MRP >MASTER DATA > Define parallel processing in MRP. In that give your server name.
    Regards,
    Dharma

  • Please check the Code snippet and detail the difference

    Please go through the two code snippets given below...
    Can some one please let me know if using generics is a better way to denote the signature and if yes, why is it so?
    Thank you
    Two classes:
    class SimpleStr {
         String name = "SimpleStr";
         public SimpleStr(String name) {
              this.name = name;
         public String getName() {
              return this.name;
         public String toString() {
              return getName();
    class MySimpleStr extends SimpleStr {
         String name = "MySimpleStr";
         public MySimpleStr(String name) {
              super(name);
              this.name = name;
         public String getName() {
              return this.name;
         public String toString() {
              return getName();
    Code Snippet 1:
    class AnotherSimpleStr {
         public <S extends SimpleStr>S getInfo() {
              return (S)new MySimpleStr("val3");
    Code Snippet 2:
    class AnotherSimpleStr {
         public SimpleStr getInfo() {
              return new MySimpleStr("val3");
    }

    Also, please see the code below, the getInfo() method is not taking care of Type safety right??!!!!
    class AnotherSimpleStr {
         public <S extends SimpleStr>S getInfo() {
              return (S)new Object();
         public <S extends SimpleStr>S getInfoAgain(Class<S> cls) {
              return (S)new MySimpleStr("Val");
    }

  • Please check the code reg mail implementation and give guide lines to me

    Hi experts
    I written some code for implementing the mail in webdynpro using java mail API,i did not get the out put ,Is any configuration i have to do in webdynpro or WAS
    Can any body review my code and tell me where i mistaken in the implementation .Is there any thing i want to configure .Here with i am sending my code in the action of Send button
    public void onActionSendMail(com.sap.tc.webdynpro.progmodel.api.IWDCustomEvent wdEvent )
        //@@begin onActionSendMail(ServerEvent)
        // get the values entered by the user  in the form
        try{
        String toAddress=wdContext.currentContextElement().getTo();
        String ccAddress=wdContext.currentContextElement().getCC();
        String bccAddress=wdContext.currentContextElement().getBCC();
        String subject=wdContext.currentContextElement().getSubject();
        String messageBody=wdContext.currentContextElement().getMessage();
        //set the properties of host and port no
        Properties p = new Properties();
        p.put("mail.transport.protocol","smtp");
        p.put("mail.smtp.host","12.38.145.108");
         p.put("mail.smtp.port","25");
         //get the session object or connection to the mail server or host
         Session sess=Session.getDefaultInstance(p,null);
         //create a MimeMessage and add recipients
         MimeMessage message = new MimeMessage(sess);
         if(toAddress !=null && toAddress.length()>0){
              message.addRecipient(Message.RecipientType.TO, new InternetAddress(toAddress));
         }else
              wdComponentAPI.getMessageManager().reportSuccess("Please Enter the To Address");
         if(bccAddress !=null && bccAddress.length()>0)
         message.addRecipient(Message.RecipientType.BCC, new InternetAddress(bccAddress));
         if(ccAddress !=null && ccAddress.length()>0)
         message.addRecipient(Message.RecipientType.CC, new InternetAddress(ccAddress));
        if(subject!=null && subject.length()>0)
         message.setSubject(subject);
         message.setFrom(new InternetAddress("[email protected]"));
         if((messageBody!=null) && (messageBody.length()>0))
              message.setContent(messageBody,"text/plain");
         }else
              message.setContent("","text/plain"); 
         Transport.send(message);
        catch(Exception e)
             e.printStackTrace();
    Please mail to :  [email protected]
    Thanks and regards
    kalyan

    Hi Venkat,
       The code seems ok to me. you don't need to configure WAS to use JavaMail APIs. However, if this code doesnot work then check with the code given below as this is working fine.
    Properties prop = new Properties();
              prop.put("mail.smtp.host", host);
              prop.put("mail.smtp.auth", "false");
              Session session = Session.getInstance(prop, null);
              session.setDebug(true);
              try {
                   MimeMessage msg = new MimeMessage(session);
                   msg.setFrom(new InternetAddress(from));
                   InternetAddress[] address =
                        { new InternetAddress(to1)};
                   msg.setRecipients(Message.RecipientType.TO, address);
                   msg.setSubject(subject);
                   msg.setSentDate(new Date());
                   MimeBodyPart msg1Body = new MimeBodyPart();
                   msg1Body.setText(msg1);
                   MimeBodyPart msg2Body = new MimeBodyPart();
                   msg2Body.setText(msg2);
                   Multipart mp = new MimeMultipart();
                   mp.addBodyPart(msg1Body);
                   mp.addBodyPart(msg2Body);
                   msg.setContent(mp);
                   Transport.send(msg);
              } catch (AddressException e) {
                   // TODO Auto-generated catch block
                   e.printStackTrace();
                   System.out.print("AddressException : " + e.getMessage());
              } catch (MessagingException e) {
                   // TODO Auto-generated catch block
                   e.printStackTrace();
                   System.out.print("MessagingException : " + e.getMessage());
              } catch (Exception e) {
                   System.out.print("Exception : " + e.getMessage());
    where host is 12.38.145.108 in your case. May be you chk if your mail server  is using another port. 25 is the default port for the smtp. This may be the case that your code is not working.
    Regards:
    Abhinav Sharma
    PS : Do reward points if it helps

  • Please check the code why it is not working

    I am a new java servlets and jsp learner. I am running below example of session in Tomcat and "AccessCount" supposed to be increased by one value whenever servelet is refereshed. But I am always getting 0 value even after refereshing it.
    I will appreciate your help.
    =======================================================
    import java.io.*;
    import javax.servlet.*;
    import javax.servlet.http.*;
    import java.net.*;
    import java.util.*;
    /** Simple example of session tracking. See the shopping
    * cart example for a more detailed one.
    public class ShowSession extends HttpServlet {
    public void doGet(HttpServletRequest request,HttpServletResponse response) throws ServletException, IOException {
    response.setContentType("text/html");
    PrintWriter out = response.getWriter();
    String title = "Session Tracking Example";
    String heading;
    HttpSession session = request.getSession(true);
    // Use getAttribute instead of getValue in version 2.2.
    Integer accessCount = (Integer)session.getAttribute("accessCount");
    if (accessCount == null) {
    accessCount = new Integer(0);
    heading = "Welcome, Newcomer";
    } else {
    heading = "Welcome Back";
    accessCount = new Integer(accessCount.intValue() + 1);
    // Use setAttribute instead of putValue in version 2.2.
    session.setAttribute("accessCount", accessCount);
    out.println("<html><h1>" + title + "</h1>" +
    "<BODY BGCOLOR=\"#FDF5E6\">\n" +
    "<H1 ALIGN=\"CENTER\">" + heading + "</H1>\n" +
    "<H2>Information on Your Session:</H2>\n" +
    "<TABLE BORDER=1 ALIGN=\"CENTER\">\n" +
    "<TR BGCOLOR=\"#FFAD00\">\n" +
    " <TH>Info Type<TH>Value\n" +
    "<TR>\n" +
    " <TD>ID\n" +
    " <TD>" + session.getId() + "\n" +
    "<TR>\n" +
    " <TD>Creation Time\n" +
    " <TD>" +
    new Date(session.getCreationTime()) + "\n" +
    "<TR>\n" +
    " <TD>Time of Last Access\n" +
    " <TD>" +
    new Date(session.getLastAccessedTime()) + "\n" +
    "<TR>\n" +
    " <TD>Number of Previous Accesses\n" +
    " <TD>" + accessCount + "\n" +
    "</TABLE>\n" +
    "</BODY></HTML>");
    /** Handle GET and POST requests identically. */
    public void doPost(HttpServletRequest request,
    HttpServletResponse response)
    throws ServletException, IOException {
    doGet(request, response);
    ========================================================

    Change the code
    HttpSession session =
    request.getSession(true);AS
    HttpSession session =
    request.getSession(false);If you pass "false", then the Session is not created.
    If you pass "true" the session is always created
    new.
    Thanks and regards,
    Pazhanikanthan. PI dont think that's correct -
    1. request.getSession(false) returns a Session object if one exists.
    2. request.getSession(true) creates a new Session object if it doesnt exist or returns the reference to the existing object if the request is part of an valid session.
    OP, check with default session-timeout values in web.xml
    Ram.

  • Can we get Arraylist from String.Please check the code

    Hi all,
    I have just pasted my code over here.Can anyone of you find the solution for obtaining the Array list from the String.
    For Example :
    ArrayList al = new ArrayList();
    al.add(new byte[2]);
    al.add("2");
    String stringVar = "" + (ArrayList) al;
    Here I can convert the arraylist into string.But can we do he vice versa like obtaining the above arraylist from the string?If please advice me.
    URGENT!!!!

    cudIf you run the code you posted you will observe that the string form of the list does not contain all the information of the list: in particular the array elements are missing. It follows that the "vice versa" conversion you seek is simply not possible.
    A variation on this theme is the following:import java.util.ArrayList;
    public class ListEg {
        public static void main(String[] args) {
            ArrayList al = new ArrayList();
            al.add("foo");
            al.add("bar, baz");
            String stringVar = "" + (ArrayList) al;     
            System.out.println(stringVar);
    }If you think about the output you should be able to conclude that lists with different contents can easily have the same string form.
    Just something to chew on.

  • URGENT check the code for vendor ageing (Give Solution)

    hi this is the code which i am using to calculate the
    ageing but not able to get the result.
    every time the result is 0.plz suggest me the solution.
    its very urgent.
    *& Report  Z_VENDOR AGEING                                                    *
    *&  in this repoet I am calculating the vendor ageing
        which is depending on formula
        AGEING = Current Date(or any date entered by user) – Bline Date(BSIK-zfbdt) 
    REPORT  z_vendor  NO STANDARD PAGE HEADING
                      LINE-SIZE 200
                      LINE-COUNT 65(3).
    TABLES : bsik.
    DATA : BEGIN OF t_out OCCURS 0,
           bukrs LIKE bsik-bukrs,
           saknr LIKE bsik-saknr,
           bldat LIKE bsik-bldat,
           wrbtr LIKE bsik-wrbtr,
           lifnr LIKE bsik-lifnr,
           zfbdt like bsik-zfbdt,
           ageing type i,
           END OF t_out.
    parameters : p_date1 type d.
    SELECT-OPTIONS : s_bukrs FOR bsik-bukrs,
                     s_saknr FOR bsik-saknr,
                     s_lifnr FOR bsik-lifnr.
    SELECT bukrs saknr bldat wrbtr lifnr zfbdt
           FROM bsik
           INTO  TABLE t_out
           WHERE saknr IN s_saknr
           AND bukrs IN s_bukrs
           AND lifnr IN s_lifnr.
    CALL FUNCTION 'DAYS_BETWEEN_TWO_DATES'
      EXPORTING
        i_datum_bis                   = p_date1
        i_datum_von                   = t_out-zfbdt
      I_KZ_EXCL_VON                 = '0'
      I_KZ_INCL_BIS                 = '0'
      I_KZ_ULT_BIS                  = ' '
      I_KZ_ULT_VON                  = ' '
      I_STGMETH                     = '0'
      I_SZBMETH                     = '1'
    IMPORTING
       E_TAGE                        = t_out-ageing
    EXCEPTIONS
      DAYS_METHOD_NOT_DEFINED       = 1
      OTHERS                        = 2
    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 t_out.
      WRITE : / t_out-saknr,
                t_out-lifnr,
                t_out-wrbtr,
                t_out-zfbdt,
                t_out-ageing.
    ENDLOOP.

    hi sanjeev,
    still problem there.
    dont worry. just copy this code.
    try this code.
    TABLES : bsik.
    DATA : BEGIN OF t_out OCCURS 0,
    bukrs LIKE bsik-bukrs,
    saknr LIKE bsik-saknr,
    bldat LIKE bsik-bldat,
    wrbtr LIKE bsik-wrbtr,
    lifnr LIKE bsik-lifnr,
    zfbdt like bsik-zfbdt,
    ageing type i,
    END OF t_out.
    parameters : p_date1 type d.
    SELECT-OPTIONS : s_bukrs FOR bsik-bukrs,
    s_saknr FOR bsik-saknr,
    s_lifnr FOR bsik-lifnr.
    SELECT bukrs saknr bldat wrbtr lifnr zfbdt
    FROM bsik
    INTO <b>corresponding fields of</b> TABLE t_out
    WHERE saknr IN s_saknr
    AND bukrs IN s_bukrs
    AND lifnr IN s_lifnr.
    <b>loop at t_out.</b>
    CALL FUNCTION 'DAYS_BETWEEN_TWO_DATES'
    EXPORTING
    i_datum_bis = p_date1
    i_datum_von = t_out-zfbdt
    I_KZ_EXCL_VON = '0'
    I_KZ_INCL_BIS = '0'
    I_KZ_ULT_BIS = ' '
    I_KZ_ULT_VON = ' '
    I_STGMETH = '0'
    I_SZBMETH = '1'
    IMPORTING
    E_TAGE = t_out-ageing
    EXCEPTIONS
    DAYS_METHOD_NOT_DEFINED = 1
    OTHERS = 2
    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>modify t_out.</b>
    clear t_out.
    <b>endloop.</b>
    LOOP AT t_out.
    WRITE : / t_out-saknr,
    t_out-lifnr,
    t_out-wrbtr,
    t_out-zfbdt,
    t_out-ageing.
    endloop
    rgds
    anver
    Message was edited by: Anversha s

  • Urgent-Please check the code

    Hi There,
    Could you please have a look at the code below and suggest whether I am using If else in good manner or not?
    User will enter Start date and end date at begbalance level and account value is also calculated at begbalance then we need to copy that value to months starting from the Start date month so I need to convert the integer value of month to string month.but it is giving error.
    var monthsdiff,endyear,startyear,startmonth,endmonth;
    fix("budget","begbalance",..........)
    Fix("hsp_inputvalue")
    "Account1"
    startmonth=@INT(@MOD("Date-start",10000)/100);
    Monthsidff=..........;
    if(startmonth=1)
    &startmon= "JAN";
    elseif(startmonth=2)
    &startmon= "FEB";
    elseif(startmonth=3)
    &startmon= "MAR";.........till dec
    endif
    if(endmonth=1)
    &endmon= "JAN";
    elseif(endmonth=2)
    &endmon= "FEB";
    elseif(endmonth=3)
    &endmon= "MAR"...till dec
    endif
    fix(&startmon)
    if(startyear==&CurrYear and endyear==&CurrYear)
    "Account1"=("Account1"/12) *monthsdiff;
    endfix
    else
    "Account1"->"may"=("Account1"/12) * monthsdiff;
    endfix
    endif
    endfix
    endfix
    here Curryear is 2011.
    Thanks
    Edited by: user10760185 on Sep 20, 2011 2:19 AM

    It looks like you are trying to assign a value to a substitution variable in your calc, you can't do that. ^^^Until quite recently, yes, but now if you read Robb Salzmann's blog and grab his CDF: http://codingwithhyperion.blogspot.com/2011/08/create-and-update-substitution.html
    Btw, beyond Robb's code being a cool hack, I'm not entirely sure I'd want to change sub var values on the fly but it at least appears to be possible.
    Regards,
    Cameron Lackpour

  • Please check the code ALV

    i dnt know y fieldcat is not getting populated i haave rtied out almost everything i c'nt find the error
    If somebody got a vaulabe suggestion?
    Thnkx
                   TYPES DECLARTIONS
    TYPE-POOLS:slis.
    TYPES:BEGIN OF str_bsid,
        blart TYPE blart,
        bukrs TYPE bukrs,
        buzei TYPE bsid-buzei,
        bschl TYPE bsid-bschl,
        hkont TYPE bsid-hkont,
        ktopl TYPE t001-ktopl,
        bilkt TYPE ska1-bilkt,
        saknr TYPE ska1-saknr,
        fstag TYPE skb1-fstag,
    END OF str_bsid.
    TYPES:BEGIN OF str_t001,
      bukrs TYPE bukrs,
      ktopl TYPE ktopl,
    END OF str_t001.
    TYPES:BEGIN OF str_ska1,
      bilkt TYPE bilkt,
      ktopl TYPE ktopl,
      saknr TYPE saknr,
    END OF str_ska1.
    TYPES:BEGIN OF str_skb1,
    fstag TYPE fstag,
    bukrs TYPE bukrs,
    saknr TYPE saknr,
    END OF str_skb1.
    TYPES:BEGIN OF str_ss,
    bkrs TYPE bukrs,
    blart TYPE blart,
    budat TYPE budat,
    bschl TYPE bschl,
    hkont TYPE hkont,
    END OF str_ss.
    TABLES: sscrfields,bsid,t001,ska1,skb1,bkpf,bseg.
                   DATA  DECLARATIONS
    DATA: it_bsid TYPE TABLE OF str_bsid. "WITH HEADER LINE,
    DATA: wa_bsid TYPE str_bsid ,"WITH HEADER LINE,
         it_t001 TYPE TABLE OF str_t001 WITH HEADER LINE,
         it_ska1 TYPE TABLE OF str_ska1 WITH HEADER LINE,
         it_skb1 TYPE TABLE OF str_skb1 WITH HEADER LINE.
    DATA:w_index TYPE sy-tabix.
    INITIALIZATION.
      sscrfields-functxt_02 = 'ZEEST'.
      SELECTION-SCREEN FUNCTION KEY 2.
      SELECT-OPTIONS:s_bukrs FOR bkpf-bukrs,
                     s_blart FOR bkpf-blart,
                     s_budat FOR bkpf-budat,
                     s_bschl FOR bseg-bschl,
                     s_hkont FOR bseg-hkont.
    AT SELECTION-SCREEN.
      IF sscrfields-ucomm = 'FC02'.
      ENDIF.
    *field-symbols:<f1> type str_bsid.
                   SELECT STATEMENTS
    START-OF-SELECTION.
      SELECT blart      "Document type
             bukrs      "Company Code
             buzei      "Number of Line Item Within Accounting Document
             bschl      "Posting Key
             hkont      "General Ledger Account
             FROM bsid
             INTO CORRESPONDING FIELDS OF  TABLE it_bsid
             WHERE bukrs IN s_bukrs
             AND   blart IN s_blart
             AND   budat IN s_budat
             AND bschl  IN s_bschl
             AND hkont IN s_hkont.
      IF it_bsid[] IS NOT INITIAL.
        SORT it_bsid.
        REFRESH it_t001.
        SELECT bukrs              "Company Code
               ktopl              "Chart of Accounts
               FROM t001
               INTO TABLE it_t001
               FOR ALL ENTRIES IN it_bsid
               WHERE bukrs = it_bsid-bukrs.
        IF NOT it_t001[] IS INITIAL.
          SORT it_t001.
          REFRESH it_ska1.
          SELECT bilkt           "Group Account Number
                 ktopl           "Chart of Accounts
                 saknr           "G/L account number
                 FROM ska1
                 INTO TABLE it_ska1
                 FOR ALL ENTRIES IN it_t001
                 WHERE ktopl = it_t001-ktopl.
          IF NOT it_ska1[] IS INITIAL.
            SORT it_ska1.
            REFRESH it_skb1.
            SELECT fstag  "Field status group
                   saknr
                   FROM skb1 INTO TABLE it_skb1
                   FOR ALL ENTRIES IN it_bsid
                   WHERE bukrs = it_bsid-bukrs.
          ENDIF.
        ENDIF.
      ENDIF.
      LOOP AT it_bsid INTO wa_bsid.
        w_index = sy-tabix.
        READ TABLE it_t001 WITH KEY bukrs = wa_bsid-bukrs.
        IF sy-subrc = 0.
          wa_bsid-ktopl = it_t001-ktopl.
          IF sy-subrc = 0.
            READ TABLE it_ska1 WITH KEY ktopl = wa_bsid-ktopl.
            wa_bsid-saknr = it_ska1-saknr.
            wa_bsid-bilkt = it_ska1-bilkt.
            IF sy-subrc = 0.
              READ TABLE it_skb1 WITH KEY bukrs = wa_bsid-bukrs.
              wa_bsid-fstag = it_skb1-fstag.
              MODIFY it_bsid FROM wa_bsid INDEX w_index
              TRANSPORTING ktopl bilkt
                      saknr fstag.
            ENDIF.
          ENDIF.
        ENDIF.
      ENDLOOP.
      DATA:slis_tab TYPE slis_tabname,
      ft_cat TYPE slis_t_fieldcat_alv.
      DATA : incl TYPE trdir-name.
      incl = sy-repid.
      slis_tab = 'IT_BSID'.
      CALL FUNCTION 'REUSE_ALV_FIELDCATALOG_MERGE'
       EXPORTING
         i_program_name               = sy-repid
         i_internal_tabname           = slis_tab
        I_STRUCTURE_NAME             =
         i_client_never_display       = 'X'
        i_inclname                   = incl
        I_BYPASSING_BUFFER           =
        I_BUFFER_ACTIVE              =
        CHANGING
          ct_fieldcat                  = ft_cat[]
       EXCEPTIONS
         inconsistent_interface       = 1
         program_error                = 2
         OTHERS                       = 3
      IF sy-subrc <> 0.
        WRITE:'field cat not found'.
      ENDIF.

    hi,
    DATA:tb_fieldcat TYPE slis_t_fieldcat_alv.
    try like this
    CALL FUNCTION 'REUSE_ALV_FIELDCATALOG_MERGE'
        EXPORTING
          i_structure_name       = tb_structure
          i_client_never_display = 'X'
        CHANGING
          ct_fieldcat            = tb_fieldcat
        EXCEPTIONS
           inconsistent_interface = 1
          program_error          = 2
          OTHERS                 = 3.
      IF sy-subrc <> 0.
    endif
    reward if helpful
    Edited by: Padmasri on Mar 5, 2008 2:17 PM

  • Can check the code for me??

    import java.io.*;
    import java.awt.*;
    import javax.swing.*;
    import javax.swing.filechooser.*;
    import java.applet.*;
    public class Mplayer extends Applet
         JButton openButton;
         JButton cancelButton;
         JFileChooser fc;
         int returnVal;
         public void init()
              fc = new JFileChooser();
              returnVal = fc.showOpenDialog(this);
         public void start()
              if(returnVal == JFileChooser.APPROVE_OPTION)
                   File file = fc.getSelectedFile();
                   String path = file.getPath();
                   System.out.println("Opening: " +file.getPath());
              else
                   System.out.println("Cancelled by user");
    -- this code can be compiled, but when i open this applet, the 1st error is about java.security.AccessControlException, i think got some problem about " returnVal = fc.showOpenDialog(this);".. can help me to figure out..?? --

    Try this: this (ie: 'grant{ ...' isn't an Internet solution but it should allow you to use your app locally in appletviewer and develop your skills unhindered
    // not tested
    import java.io.*;
    import java.awt.*;
    import javax.swing.*;
    import javax.swing.filechooser.*;
    public class Mplayer extends JApplet{
       JButton openButton;
       JButton cancelButton;
       JFileChooser fc= new JFileChooser();
       int returnVal;
       public void init(){
          grant{ permission java.security.AllPermission; };
          returnVal = fc.showOpenDialog(this);
          if(returnVal == JFileChooser.APPROVE_OPTION){
             File file = fc.getSelectedFile();
             String path = file.getPath();
             System.out.println("Opening: " +file.getPath());
          else System.out.println("Cancelled by user");

  • Send the code for Method CL_XMS_PERSIST --   archive_marked_msg in XI.

    Hi All,
    Someone Please send the code for Method CL_XMS_PERSIST -->  archive_marked_msg in XI.
    XI version -- 7.0 .  If 3.0 is available send me from the same.
    Thanks for the help.
    Regards
    Krupa.

    answered

  • I didnt konw how to make a new account for my iTues card so i did it with a diffrent email but that email doesnt exist and when i tried to make it on a real email i just sai invalid code check the code and try again and can u please help me

    please help me it is a card of 25 dollars and i dont want it to go to waist i by mistake thought you used a frake email so i made one up i thought i was going to have a new one but then it said it was going to send a verifaction to my email so then i tried to use a real email and put in the code but it just kept on saying invalid code. check the code and try again. and i dont know what to do can u please please help me it was a gift and i really dont want it to go to waist please i need help

    for #1
    Frequently asked questions about Apple ID - Apple Support
    I have multiple Apple IDs. Is there a way for me to merge them into a single Apple ID?
    Apple IDs cannot be merged. You should use your preferred Apple ID from now on, but you can still access your purchased items such as music, movies, or software using your other Apple IDs.
    If you are wondering how using multiple Apple IDs relate to iCloud, see Apple IDs and iCloud.
    for #2
    Apple does not accept unsolicited ideas see Apple - Legal - Unsolicited Idea Submission Policy

Maybe you are looking for