Problem with decode function while dispaly the data

Hi friends ,
I want the output like this.
sample:
CLIENT CODE: 00027
PLAN CODE: 01
SSN Last Name First Name TYPE Frequency Amount
123-45-6036 Perrault Julia D M 250.00
123-45-6036 Perrault Julia D Q 400.00
CLIENT CODE: 00027
PLAN CODE: 02
SSN Last Name First Name TYPE Frequency Amount
123-45-6036 Perrault Julia D S 1000.00
123-45-7042 Testaverde Alexander D B 50.00
this is my query:
SELECT distinct pln.plan_code,
ind.ssn,
ind.last_name,
ind.first_name,
pln.clt_client_id,
DECODE(rp.account_code,'AMNT',rp.userid,NULL) amount,
DECODE(rp.account_code,'FREQ',rp.userid,NULL) frequence,
DECODE(rp.account_code,'TYPE',rp.userid,NULL) type
FROM rp_extract_recon rp,
plan pln,
indicative ind
where ind.indicative_id in ( select distinct
rp1.ind_indicative_id
from rp_extract_recon rp1
where rp1.rp_extract_recon_id =
rp.rp_extract_recon_id )
and ind.clt_client_id = pln.clt_client_id
and pln.plan_id = rp.pln_plan_id
and rp.bat_batch_info_id = 14078
and rp.rp_report_type_code = 'TEST'
output for above query:
PLAN_C SSN LAST_NAME FIRST_NAME CLT_C AMOUNT
FREQUENCE TYPE
01 123456036 Perrault Julia 00027 250.00
01 123456036 Perrault Julia 00027 400.00
01 123456036 Perrault Julia 00027 M
01 123456036 Perrault Julia 00027 Q
01 123456036 Perrault Julia
00027 D
02 123456036 Perrault Julia 00027 1000.00
02 123456036 Perrault Julia 00027 S
02 123456036 Perrault Julia
00027 D
02 123457042 Testaverde Alexander 00027 50.00
02 123457042 Testaverde Alexander 00027 B
02 123457042 Testaverde Alexander
00027 D
11 rows selected.
11 rows selected.
how can i get the above ouput .
i want the type,frequency,amount values in one line.
please help me.
thanks for u r kind help.
srini

Hi.
I have not tested this my self, byt tryit.
SELECT pln.plan_code,
ind.ssn,
ind.last_name,
ind.first_name,
pln.clt_client_id,
MAX(DECODE(rp.account_code,'AMNT',rp.userid,NULL)) amount,
MAX(DECODE(rp.account_code,'FREQ',rp.userid,NULL)) frequence,
MAX(DECODE(rp.account_code,'TYPE',rp.userid,NULL)) type
FROM rp_extract_recon rp,
plan pln,
indicative ind
where ind.indicative_id in ( select distinct
rp1.ind_indicative_id
from rp_extract_recon rp1
where rp1.rp_extract_recon_id =
rp.rp_extract_recon_id )
and ind.clt_client_id = pln.clt_client_id
and pln.plan_id = rp.pln_plan_id
and rp.bat_batch_info_id = 14078
and rp.rp_report_type_code = 'TEST'
GROUP BY pln.plan_code,
ind.ssn,
ind.last_name,
ind.first_name
/Uffe

Similar Messages

  • Problem with decode function while dispaly the data ( urgent )

    Hi friends ,
    I want the output like this.
    sample:
    CLIENT CODE: 00027
    PLAN CODE: 01
    SSN Last Name First Name TYPE Frequency Amount
    123-45-6036 Perrault Julia D M 250.00
    123-45-6036 Perrault Julia D Q 400.00
    CLIENT CODE: 00027
    PLAN CODE: 02
    SSN Last Name First Name TYPE Frequency Amount
    123-45-6036 Perrault Julia D S 1000.00
    123-45-7042 Testaverde Alexander D B 50.00
    this is my query:
    SELECT distinct pln.plan_code,
    ind.ssn,
    ind.last_name,
    ind.first_name,
    pln.clt_client_id,
    DECODE(rp.account_code,'AMNT',rp.userid,NULL) amount,
    DECODE(rp.account_code,'FREQ',rp.userid,NULL) frequence,
    DECODE(rp.account_code,'TYPE',rp.userid,NULL) type
    FROM rp_extract_recon rp,
    plan pln,
    indicative ind
    where ind.indicative_id in ( select distinct
    rp1.ind_indicative_id
    from rp_extract_recon rp1
    where rp1.rp_extract_recon_id =
    rp.rp_extract_recon_id )
    and ind.clt_client_id = pln.clt_client_id
    and pln.plan_id = rp.pln_plan_id
    and rp.bat_batch_info_id = 14078
    and rp.rp_report_type_code = 'TEST'
    output for above query:
    PLAN_C SSN LAST_NAME FIRST_NAME CLT_C AMOUNT
    FREQUENCE TYPE
    01 123456036 Perrault Julia 00027 250.00
    01 123456036 Perrault Julia 00027 400.00
    01 123456036 Perrault Julia 00027 M
    01 123456036 Perrault Julia 00027 Q
    01 123456036 Perrault Julia
    00027 D
    02 123456036 Perrault Julia 00027 1000.00
    02 123456036 Perrault Julia 00027 S
    02 123456036 Perrault Julia
    00027 D
    02 123457042 Testaverde Alexander 00027 50.00
    02 123457042 Testaverde Alexander 00027 B
    02 123457042 Testaverde Alexander
    00027 D
    11 rows selected.
    11 rows selected.
    how can i get the above ouput .
    i want the type,frequency,amount values in one line.
    thanks for u r kind help
    srini

    Hi Srini,
    Add Max in the begining and group by at the end of statement.
    Please let me know in both cases if it works or not.
    thanks
    for example
    SELECT distinct pln.plan_code,
    ind.ssn,
    ind.last_name,
    ind.first_name,
    pln.clt_client_id,
    MAX(DECODE(rp.account_code,'AMNT',rp.userid,NULL) amount,
    DECODE(rp.account_code,'FREQ',rp.userid,NULL) frequence,
    DECODE(rp.account_code,'TYPE',rp.userid,NULL) type )
    FROM rp_extract_recon rp,
    plan pln,
    indicative ind
    where ind.indicative_id in ( select distinct
    rp1.ind_indicative_id
    from rp_extract_recon rp1
    where rp1.rp_extract_recon_id =
    rp.rp_extract_recon_id )
    and ind.clt_client_id = pln.clt_client_id
    and pln.plan_id = rp.pln_plan_id
    and rp.bat_batch_info_id = 14078
    and rp.rp_report_type_code = 'TEST'
    GROUP BY
    pln.plan_code,
    ind.ssn,
    ind.last_name,
    ind.first_name,
    pln.clt_client_id,

  • Problem with call to BAPI when the data contains spaces

    Hi everyone,
    I've a table in R3 that has 2 fields which is consulted via BAPI from XI. The Bapi call run correctly while the data don't contain spaces preffixed but when for example the data is ' A31' the BAPI call doesn't return nothing.
    The table structure is:
    CODE             DESCRIPTION
    values:
    ' A31'               'Desc A'
    'A30'                'Desc B'
    When I call the bapi with A30 value the Bapi return me Desc B, but when I try it with the value ' A31' the Bapi doesn't return any value.
    Could anyone help me?
    Thanks in advance

    >>The problem isn't the trim, because the bapi call must contain the spaces.
    Are you able to get expected results while testing the BAPI with data containing spaces?
    I have seen some cases where you get correct results when you test the RFC in SE 37, but the same data when passed from XI does not get the desired results. It was coz. when testing the RFC in R/3 some user exits are called and the data fets populated in the correct way. Check this.
    Regards,
    Jaishankar

  • Problem with decode function.

    Hi,
    Can anyone of you help me out in solving this?
    It is like i wish to give different select statements according to the value of a parameter entered by user USING DECODE FUNCTION.The select statement contains some other select statements inside it.So when i execute it,it is giving error like 'ORA-00913-too many values(even when i enclose select statements within brackets).

    ORA-00913 too many values
    Cause: The SQL statement requires two sets of values equal in number. This error occurs when the second set contains more items than the first set. For example, the subquery in a WHERE or HAVING clause may return too many columns, or a VALUES or SELECT clause may return more columns than are listed in the INSERT.
    Action: Check the number of items in each set and change the SQL statement to make them equal.
    the above is from oracle documentation. the brackets is not the problem, u must be using multiple items in the integrated decode queries. If the problem still exists post ur DML for further analysis.
    zaibi.

  • Problem with DECODE statement while migrating forms to 6i

    Hi,
    I'm migrating a form from 5 to 6i. When I compiled the form, I got this error witha decode statement.
    The error is
    Error 307 at line 15 column 7
    too many declarations of "DECODE" match this call
    The trigger has this code:
    IF :PRUN_RECS_INSERTED = 'Y' THEN
          RETURN ;
       END IF ;
       INSERT INTO GJBPRUN
        ( GJBPRUN_JOB,
          GJBPRUN_ONE_UP_NO,
          GJBPRUN_NUMBER,
          GJBPRUN_ACTIVITY_DATE,
          GJBPRUN_VALUE )
       SELECT :KEYBLCK_JOB,
              :ONE_UP_NO,
               GJBPDFT_NUMBER,
               SYSDATE,
          DECODE(GJBPDFT_VALUE, 'SYSDATE',
                          DECODE(GJBPDEF_LENGTH,'11',TO_CHAR(SYSDATE,'DD-MON-YYYY'), SYSDATE),
                          GJBPDFT_VALUE)
       FROM   GJBPDFT G, GJBPDEFEdited by: Charan on Mar 16, 2011 9:15 AM

    Hi Charan
    i think it's all about using both CHARACTER and DATE values at the same time in a DECODE statment u should either use char or date datatype.
    DECODE compares expr to each search value one by one. If expr is equal to a search, then Oracle Database returns the corresponding result. If no match is found, then Oracle returns default. If default is omitted, then Oracle returns null.
    e.g.
    If expr and search are character data, then Oracle compares them using nonpadded comparison semantics.
    expr, search, and result can be any of the datatypes CHAR, VARCHAR2, NCHAR, or NVARCHAR2.
    The string returned is of VARCHAR2 datatype and is in the same character set as the first result parameter.
    for more pls have a look here
    Hope this helps,
    Regards,
    Abdetu...

  • Problem with decode function ( urgent )

    Hi friends ,
    this is my query
    SELECT DECODE(rp.account_code,'TYPE',rp.userid,NULL) type,
    DECODE(rp.account_code,'FREQ',rp.userid,NULL) frequence,
    DECODE(rp.account_code,'AMNT',rp.userid,NULL) amount
    FROM rp_extract_recon rp,
    plan pln,
    indicative ind
    where ind.indicative_id in ( select distinct
    rp1.ind_indicative_id
    from rp_extract_recon rp1
    where rp1.rp_extract_recon_id =
    rp.rp_extract_recon_id )
    and ind.clt_client_id = pln.clt_client_id
    and pln.plan_id = rp.pln_plan_id
    and rp.bat_batch_info_id = 14078
    and rp.rp_report_type_code = 'TEST'
    getting output like this:
    TYPE FREQUENCE AMOUNT
    S
    D
    1000.00
    M
    D
    250.00
    Q
    D
    400.00
    B
    D
    50.00
    12 rows selected.
    i want the output like this :
    TYPE Frequency Amount
    D M 250.00
    D Q 400.00
    D S 1000.00
    D B 50.00
    how can get the above out put.
    thanks for u r kind help
    srini

    Try formatting your columns
    col type for a4
    col frequence for a4
    col amount for a4
    although from looking at you query, I don't understand the
    output you pasted. YOu have 3 decode statments based on the
    same fields?
    Hi friends ,
    this is my query
    SELECT DECODE(rp.account_code,'TYPE',rp.userid,NULL) type,
    DECODE(rp.account_code,'FREQ',rp.userid,NULL) frequence,
    DECODE(rp.account_code,'AMNT',rp.userid,NULL) amount
    FROM rp_extract_recon rp,
    plan pln,
    indicative ind
    where ind.indicative_id in ( select distinct
    rp1.ind_indicative_id
    from rp_extract_recon rp1
    where rp1.rp_extract_recon_id =
    rp.rp_extract_recon_id )
    and ind.clt_client_id = pln.clt_client_id
    and pln.plan_id = rp.pln_plan_id
    and rp.bat_batch_info_id = 14078
    and rp.rp_report_type_code = 'TEST'
    getting output like this:
    TYPE FREQUENCE AMOUNT
    S
    D
    1000.00
    M
    D
    250.00
    Q
    D
    400.00
    B
    D
    50.00
    12 rows selected.
    i want the output like this :
    TYPE Frequency Amount
    D M 250.00
    D Q 400.00
    D S 1000.00
    D B 50.00
    how can get the above out put.
    thanks for u r kind help
    srini

  • Problems with and tags while reading the xml file

    Hi
    I am using the xml files in my project. The project uses Tomcat, JMS. The project is divided into some components which communicate with each oher thru JMS. The component for which I am responsible gets a dcoument object from the JMS which is a processed xml of the following format (the processing is done by the DBMS_XMLGEN package of oracle)
    <?xml version="1.0" encoding="UTF-8"?>
    <root>
    <filename>157_1000000001</filename>
    <querydata>
    <tabdata>
    <tabinfo>Tab-id3</tabinfo>
    <queryset>
    <query name="Fax">
    select a.ARLN_NAME,d.TICKETED_ORIGIN,d.TICKETED_DESTINATION, d.ENDORSEMENTS,to_char(d.DATE_OF_ISSUE,'DDMONYY') as DATE_OF_ISSUE ,d.EXCHANGE_DOC_TYPE,
                   d.PASSENGER_NAME,d.ORIG_ISS_AIRLINE,d.ORIG_DOC_NO,d.ORIG_PLACE_OF_ISSUE,
                   to_char(d.ORIG_DATE_OF_ISSUE,'DDMONYY'),d.ORIG_ISSUE_AGENT,d.CUR_OF_SALE,d.GROSS_FARE,d.EQUIV_CUR_OF_SALE,d.EQUIV_FARE,
                   d.PANDA_DEAL_CODE,d.ISI,d.reporting_date
                   from airline_master a,ticket_main d,ticket_conj e where d.doc_no = e.doc_no and d.iss_airline = e.iss_airline
                   and e.conj_doc_no = (select DOC_NO from TICKET_CONJ where CONJ_DOC_NO = 1000000001 and ISS_AIRLINE = 157)
                   and e.ISS_AIRLINE = 157 and d.iss_airline = a.ARLN_NUM_CODE
    </query>
    </queryset>
    </tabdata>
    </querydata>
    the function on my side is like this
    private void processMessage(ObjectMessage objmessage)
         Document XMLreqObject = (Document) objmessage.getObject();
         Element root = XMLreqObject.getRootElement();                
         String resultFilename = root.getChildText("filename");
         Element tabSet = root.getChild("querydata");//doesnt work
         ArrayList tabSetlist = new ArrayList(tabSet.getChildren ("tabdata"));//doesnt work
    The code commented with "doesnt work", is not working. What must be the problem ?
    Thanks in Advance
    Martin

    Okay. Your original example XML didn't include < or > which was rather confusing if that particular feature was supposed to be the cause of the problem. Also calling them "tags" was rather confusing since "tags" is the term for the things that come at the beginning and of an element, like this:<data>...</data>Anyway, I assume your theory is that documents that don't have < in a text element process correctly and documents that do have < in a text element get "stuck" in the parser? Well, from your original description the process appears to be:
    1. Create XML
    2. Parse it into a Document
    3. Send the Document via JMS
    4. Receive the Document via JMS
    5. Process it.
    And it's step 4 that is "stuck"? That would be my guess based on the code you posted.

  • Problems with OC4J EJB deployment and the data-sources.xml file

    I am running 2 Windows 2000 Machines one with the 8.1.7 database another with iAS 1.0.2.2.1 and OC4J.
    I am trying to deploy a 3rd party EJB-based application whic seems to have deployed successfully except when I try to test the EJB deployment via a jsp it can't connect to the database, giving the error:
    1/16/02 4:52 PM VerySimple: Servlet error
    java.lang.NoClassDefFoundError: com.netexp.user.UserManagerHome
    at com.netexp.beans.BeanHelper.class$(Unknown Source)
    at com.netexp.beans.BeanHelper.getUserManagerBean(Unknown Source)
    at /very_simple.jsp._jspService(/very_simple.jsp.java:48) (JSP page line 27)
    at com.orionserver[Oracle9iAS (1.0.2.2.1) Containers for J2EE].http.OrionHttpJspPage.service(OrionHttpJspPage.java:54)
    at com.evermind[Oracle9iAS (1.0.2.2.1) Containers for J2EE].server.http.HttpApplication.serviceJSP(HttpApplication.java:5459)
    at com.evermind[Oracle9iAS (1.0.2.2.1) Containers for J2EE].server.http.JSPServlet.service(JSPServlet.java:31)
    at com.evermind[Oracle9iAS (1.0.2.2.1) Containers for J2EE].server.http.ServletRequestDispatcher.invoke(ServletRequestDispatcher.java:508)
    at com.evermind[Oracle9iAS (1.0.2.2.1) Containers for J2EE].server.http.ServletRequestDispatcher.forwardInternal(ServletRequestDispatcher.java:177)
    at com.evermind[Oracle9iAS (1.0.2.2.1) Containers for J2EE].server.http.HttpRequestHandler.processRequest(HttpRequestHandler.java:576)
    at com.evermind[Oracle9iAS (1.0.2.2.1) Containers for J2EE].server.http.HttpRequestHandler.run(HttpRequestHandler.java:189)
    at com.evermind[Oracle9iAS (1.0.2.2.1) Containers for J2EE].util.ThreadPoolThread.run(ThreadPoolThread.java:62)
    I try to update the file using the installdatasource switch thus:
    C:\Oracle\iSuites\j2ee\home>java -jar admin.jar ormi://localhost admin adm_pwd -application apptricityII -installDataSource -jar %ORACLE_HOME%\jdbc\lib\classes12.zip -url jdbc:oracle:thin:@db_host.unitas.com:1521:db_name -connectionDriver oracle.jdbc.driver.OracleDriver -location jdbc/pool/OracleDataSource -username scott -password tiger
    And get the following error:
    Exception passing by from remote server: java.lang.InstantiationException: No class specified for jdbc/pool/OracleDataSource
    java.lang.InstantiationException: No class specified for jdbc/pool/OracleDataSource
    <<no stack trace available>>
    Error adding source: No class specified for jdbc/pool/OracleDataSource
    Please advise.
    I have followed the instructions in 'EJB Primer' and 'Using Oracle9iAS Containers for J2EE' to no avail. And I can't find any meaningfull data-sources.xml samples. I have been struggling with this for some time.
    Is there any other file, do I need to bind anything?
    I'd appreciate your assistance.
    Thank you
    Louiza

    Hi Louiza,
    Show us your web.xml and ejb-jar.xml files as well as your
    data-source.xml file.
    Thanks,
    Avi.

  • Is anybody else having a problem with Bluetooth functionality after iOS 7? I have lg tone Bluetooth headset that I use while working out, cutting the grass, etc. Before the update I could press the "next track", but anymore.... Help?! Please!!!!!!

    Is anybody else having a problem with Bluetooth functionality after iOS 7? I have lg tone Bluetooth headset that I use while working out, cutting the grass, etc. Before the update I could press the "next track", but anymore.... Help?! Please!!!!!!

    Tell Apple about it: http://www.apple.com/feedback/iphone.html
    Be sure to give as much detail as possible.
    I would also check LG's site.

  • Error while replacing IF statements with DECODE function in procedure

    Hi All,
    I have created a procedure which has nested IF statements. Now I want to replace the IF statements with DECODE functions to improve performance.
    Procedure:
    IF (var_int_sev = '0')
    THEN
    var_sev := '2';
    ELSE
    SELECT sev
    INTO var_int_sev
    FROM errorconfig
    WHERE errorcode = var_errorcode;
    var_sev := var_int_sev;
    END IF;
    I converted the above IF statement into DECODE function as mentioned below:
    var_Sev := DECODE(var_int_sev,0,2,SELECT severity FROM errorconfig WHERE errorcode=var_ErrorCode)
    But it throws below error at the select statement used inside DECODE.
    Error(58,51): PLS-00103: Encountered the symbol "SELECT" when expecting one of the following: ( - + case mod new not null others <an identifier> <a double-quoted delimited-identifier> <a bind variable> avg count current exists max min prior sql stddev sum variance execute forall merge time timestamp interval date <a string literal with character set specification> <a number> <a single-quoted SQL string> pipe <an alternatively-quoted string literal with character set specification> <an alternativ
    Can someone help me in converting the IF to DECODE in the above case. Also how can we use a select statement inside decode.

    instead of trying to rewrite all your code and hoping that the performance will be better, it's a better option to investigate and find out which part of your application is slow
    read this:
    When your query takes too long ...

  • Problem while refreshing the data for the second time using excel services in sharepoint 2013...

    Hi,
    I have migrated my Sharepoint from 2010 to 2013.I am able to get the data at the first time of refresh when I click on refresh for the second time I am getting the empty the sheet.
    below find the flow of refresh
    First Refresh
    On Click of refresh open the workbook with excel services and return the session id.
    Using that session I am invoking RefrehAsync method of excel services
    After refresh completed I am setting the calculation of workbook as automatic(to calculate the formulas) using the same session id
    After setting the calculation as Automatic I am setting the calculation type as full(recalculate) using the same session id.
    Now I am able to see the data
    Second Refresh
    After clicking on refresh instead of opening the workbook I am using the session id(already opened workbook) and setting the calculation type as manual
    I am following the same process from refresh(RefreshAsync) as I have followed in first refresh.
    This time my formulas are not getting calculated because of that I am not able to see the data.
    Could you please let me know that am I missing anything here?
    Is this know issue in Sharepoint2013 excel services as same code is working fine with Sharepoint2010.
    If I close the workbook(session id null) and opens(new session id) for all the refreshes it is working and I am able to see the data.
    Thanks,
    Meenakshi Nagpal
    N.Meenakshi

    I am able to see the data for the second refresh  if I change the data source.If I use the same data source which is used in the first refresh I am not getting the data.Excel services will contact the cubes and calculate the formulas in my workbook.
    Could you please let me know what could be the problem at second refresh while contacting the same data source with same session id?
    Please help me asap.
    Thanks,
    Meenakshi Nagpal
    N.Meenakshi

  • BI7.0 Hexdecimal values problem while activating the data in DSO

    Hi Friends,
                     I've got the data upto PSA and i've run DTP also from PSA to DSO, but while activating the data in DSO from New Data Table to Active Data Table, it's giving the error given below:
    Error when assigning SID: Action VAL_SID_CONVERT table
      0DOC_HD_TXT     
    Value '1st disb' (hex. '00310073007400200064006900730062') of          characteristic 0DOC_HD_TXT contains invalid characters
    Process 000037 returned with errors.
                it isn't accepting the values like with numberels and chars together
    ex: 1st disb, 70 cr Gen Hsg.
                   I want the same to be in the report, how these are to be allowed?, i don't want to edit in PSA and there are a lot of values like that i can't edit all those, since there are thousands of records.
    Regards,
    BalajiReddy

    Hi Anil,
                       Thanx for your quick replay, i've allowed ',' in RSKC and i've checked the check box LOWER CASE LETTERS for IO 0DOC_HD_TXT, the problem was almost solved out. What does ',' mean by?
                          Why lower case letter has to be checked only for this IO (0DOC_HD_TXT), not for others? if it is checked, it allows only lower cases, doesn't allow upper cases i think. won't there be any problem? if it is done like that?
            pls tell me the reason, i'm really thankfull for your quick replay
    Regards,
    BalajiReddy

  • I cannot determine how to utilize the voice function while in the fitness workout area. On rare occasions it works with a voice summary of my workout and a new summary screen. would appreciate help

    I cannot determine how to utilize the voice function while in the fitness mode. On one or two occassions it worked but I do not know how it was activated. It gives a voice summary and new summary screen for the workout.

    Hi shiva
    Thanks for your help,
    Can you check this coding and revert me back ASAP Please.
    REPORT BDS_GOS_CONNECTION.
    DATA : logical_system LIKE BAPIBDS01-log_system.
           CLASSNAME LIKE BAPIBDS01-CLASSNAME
           OBJKEY LIKE SWOTOBJID-objkey.
    PARAMETERS: pa_lo_sys BAPIBDS01-log_system,
                pa_class like BPIBDS01-CLASSNAME,
                pa_objkey like swotobjidobjkey.
    AT SELECTION-SCREEN.
    CALL FUNCTION 'BDS_GOS_CONNECTIONS_GET'
             EXPORTING
                  bor_id             = bor_id
             IMPORTING
                  logical_sytem      = pa_lo_sys.
                  classname          = pa_class.
                  objkey            = pa_objkey.
             EXCEPTIONS
                  no_objects_found     = 1
                  internal_error       = 2
                  internal_gos_error   = 3.
       IF sy-subrc <> 0.
         MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
                 WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
       ENDIF.
    clear v_attno1.
    i_object1-typeid = 'BUS2012'.
    i_object1-catid  = 'BO'.
    i_object1-instid = i_yItem-docno.
    call method cl_gos_attachment_query=>count_for_object
       exporting
        is_object = i_object1
        ip_arl    = space
       receiving
        rt_stat   = i_stat1.
    read table i_stat1 into wa_stat1 index 1.
    if sy-subrc eq c_0.
        move wa_stat1-counter to v_attno1.
    endif.             
    CALL METHOD cl_gos_attachment_query=>count_for_object
    EXPORTING
    is_object = object
    ip_arl =    space
    RECEIVING
    rt_stat = lt_stat.
    READ TABLE lt_stat INDEX 1 into ls_stat.
    count = ls_stat-counter.
    *The object has to be a concatenation of your document, like this:
    CONCATENATE object-instid tab-gjahr INTO object-instid.
    ELSE.
    CONCATENATE tab-bukrs tab-belnr tab-gjahr INTO
    object-instid.
    ENDIF.

  • Problem while exporting the data from a report to an excel file.

    Hi SAP guru's,
    I have a problem while exporting the data from a report to an excel file.
    The problem is that after exporting, the excel file seems to have some irrelevant characters....I am checking this using SOST transaction..
    Required text (Russian):
    Операции по счету                                    
    № документа     Тип документа     № учетной записи     Дата документа     Валюта     Сумма, вкл. НДС     Срок оплаты     Описание документа
    Current Text :
       ? 5 @ 0 F 8 8  ? >  A G 5 B C                                   
    !   4 > : C       "" 8 ?  4 > : C      !   C G 5 B = > 9  7 0 ? 8 A 8        0 B 0  4 > : C         0 ; N B 0      ! C <       ! @ > :  > ? ; 0 B K        ? 8 A 0 = 8 5  4 > : C
    Can you help me making configuration settings if any?
    Regards,
    Avinash Raju

    Hi Avinash
    To download  such characteres you need to adjust code page to be used during export. You can review SAP note 73606 to identify which code page is required for this language
    Best regards

  • Facing a Problem while downloading the data from ALV Grid to Excel Sheet

    Hi Friends,
    Iam facing a problem while downloading the data from ALV Grid to excel sheet. This is working fine in Development server , when comes to Quality and Production servers I have this trouble.
       I have nearly 11 fields in ALV Grid and out of which one is PO number of length 10 , all the ten numbers are visible in the excel sheet if we download it from development server but when we download it from Quality or Production it is showing only 9 numbers.
    Can any one help me out in this case.

    hi...
    if this problems happens dont display the same internal as u finally got.
    just create new internal table without calling any standard data elements and domains... but the new internal table s similar like ur final internal table and move all the values to new int table.
    for eg.
    ur final internal int table for disp,
         data : begin of itab occur 0,
                        matnr like mara-matnr,
                   end of itab.
    create new like this,
               data : begin of itab occur 0,
                        matnr(12) type N,
                   end of itab.

Maybe you are looking for

  • I downloaded the new itunes verison,10.7, but it wont let me open it up on my desktop. What do I do?

    I downloaded the new itunes verison 10.7, but now i cant open it from my computer. I clicked on the itunes icon on my home screen but it said i cant open it because a new verison of itunes has been created. What do I do?

  • How I fixed the missing Flash.exe in Extension manager 5

    I was surprised to see that Flash 5 was absent from the list of programs in Extension Manager 5 First I ran Adobe Utilities-CS5/ExtenScript Toolkit CS5 BridgeTalk.__diagnostics__; In the relevant section in Result: BridgeTalk Diagnostics flash-11.0:

  • Deauthorize a stolen MacBook Pro - "deauthorize all" not an option

    My MacBook Pro was stolen yesterday, and I'd like to deauthorize that laptop so the thieves can't access the music (assuming they can hack the account and get into the machine without a wiping it clean first). I only have two other machines authorize

  • Safari 4.1.1 and 4.1.2 problem

    Safari 4.1.1 stops loading some pages with only one item to go, and only on some websites. I recently updated to Safari 4.1.2 and it is worse. I am using airport extreme 7.4.2 wireless to access the internet. The pages that stop loading, always stop

  • Message Display Tool

    I want to see the message bytes sent out from a SOAP receiver adapter using the Message monitor at: http://<server>:<port>/MessagingSystem/monitor/monitor.jsp But the button "Display Message Bytes" button, takes to an error page that shows: "The curr