Can it be a bug in SAP code?

Hi Guys,
I am running a report in which there are hierarchies. The top level node is the sum of its child node. When the report runs first, I see the top node is having value, whereas its child nodes are blank.
When I collapse the hierarchy, the value for the child node doesnt come up, but when I expand the hierarchy again, I see the values in the child node as well as the top node.
I have checked following things.
1) There is no table interface
2) The hierarchy nodes are working fine in other reports
3) There is only one structure, so no problem of formula collision.
Do you think of any other root cause?
Rgds,
Shailesh

Hello,
As I understand your question, All the thing which are releted to costing are done only at the controlling area level not at company code.
As your req diffrent cost componenet for diffrent company code is depend up on how you define the controlling area.
Hope it will clear you
Regards
Ravi

Similar Messages

  • Where i can find lc workspace bug free source code?

    Hi,
    I have adobe livecycle es2 pack installed alongwith workbench 9.0. i need bug free workspace source code for customization. as souce code availabe in live cycle es2 sdk is not what has been described in "customize workspace ui". I don't want to downlaod full live cycle server again or workbench?
    i just need patched livecycle workspace source code?
    where i can find the zip file or is there any other way to update the same?

    It is not clear what version you have (es2 pack?) but there were definite problems with the workspace source code and customization in the ES2 GM release.  These were fixed in SP1 and are also in SP2.
    Note that the workspace source is distributed in both the LC and Workbench installs but the Workbench install may contain the original GM release source, depending on the Workbench version you have.  Workbench 9.5 was released with LC ES 2.5 (aka SP2), but i'm not sure if that even has the updated source.
    To avoid any confusion, you should only use the source from the LC ES2 install.  And to get the latest workspace source you should apply the latest service pack (this would be SP2 at this time) and get the latest ProcessManagement Patch for SP2.  The workspace source is in the zip file at the location indicated in Jasmine's reply.

  • Looks like a bug in SAP code - Please let me know if you have faced it

    Hi All,
    My requirement - to protect a range in excel sheet and download the excel to PC
    but this particular method provided by SAP does not work
    CALL METHOD spreadsheet->protect_range
           EXPORTING name      = name
                     protect   = protect
                     no_flush  = no_flush
           IMPORTING error     = error
                     retcode   = retcode.
    The full sheet protection method does work. Please let me know incase you have come across this issue.

    JUST FOUND THIS ON NEWEGG!
    Rating: 1/5Major problems, but HP added free warranty support to fix
    This review is from: HP Pavilion Elite HPE-400F (BT470AA#ABA) Desktop PC Phenom II X4 945 (3.0GHz) 8GB DDR3 1TB HDD Windows 7 Home Premium 64-bit
    Pros: HP is offering a North America Limited Warranty Service Enhancement which extends the warranty on these because of numerous reported issues! Free motherboard replacement.
    http://h10025.www1.hp.com/ewfrf/wc/document?docnam​e=c03199423&cc=us&dlc=en&lc=en&product=4300938
    Cons: Numerous users report blue screening, random reboots, or no boot without beeps!
    BUT I HAD TO STUMBLE ON TO THIS, AFTER MINE QUIT!
    NOW THEY SAY, SORRY, ALL OUT OF THEM, AND YOUR OUT OF WARRANTY,  AND S * * * OUT OF LUCK & $800.00!!!!!!!!!!!!!

  • How to find a string in SAP code

    Hello,
    Does anyone here know how I can find a string inside the SAP code efficiently? I tried finding a custom table name using the Where-used list feature but the results doesn't show the complete/correct results. It missed some user exits where the table name was also used.
    Please help

    Hello Jimmy,
    You can try what Krishna has said there is one more way that is
    goto trxn SE12,
    enter Z* in the table name field,
    it will give a popup box with all the Ztables found in your system...you can find your table maybe it is a little tedious job
    Sravani

  • Bug in my code or strange memory behavior ?

    Hi, Guys !
    It's been a while since I post something in this forum - trying to use your help when it's really needed.
    So, here we go ...
    (we use Oracle 8.1.7 on Unix box and SQL * Plus 8.1.6)
    While back I wrote "core" PL/SQL package that resides in let's say DB1 database. It has RECORD_EXISTS_FNC function designed to dynamically check If the record exists in certain table/view. Assumptions are that you pass in :
    Table/View name, Column name, and unique numeric value (because by DBA rules all of our Tables have SEQUENCE as a Primary Key. And I plan soon to put in overloaded function to accept unique character value)
    Also every Table has SYS_TIME_STAMP and SYS_UPDATE_SEQuence columns that populated by Trigger before Insert/Update representing Last Update time_stamp
    and how many times record was updated within same second.
    (in case more than one User updates same record in same time - that was written before Oracle had more granular date/time). So function has SYS_TIME_STAMP and SYS_UPDATE_SEQUENCE parameters (optional) accordingly.
    And It looks something like :
    FUNCTION RECORD_EXISTS_FNC
    (iBV_NAME IN USER_VIEWS.VIEW_NAME%TYPE,
    iPK_FIELD IN USER_TAB_COLUMNS.COLUMN_NAME%TYPE,
    iPK_VALUE IN NUMBER,
    iSYS_TIME_STAMP IN DATE DEFAULT NULL,
    iSYS_UPDATE_SEQ IN NUMBER DEFAULT NULL) RETURN BOOLEAN IS
    TYPE REF_CUR IS REF CURSOR;
    CR REF_CUR;
    i PLS_INTEGER DEFAULT 0;
    vRESULT BOOLEAN DEFAULT FALSE;
    vQUERY USER_SOURCE.TEXT%TYPE;
    BEGIN
    vQUERY := 'SELECT 1 FROM ' || iBV_NAME || ' WHERE ' || iPK_FIELD || ' = ' || iPK_VALUE;
    IF iSYS_TIME_STAMP IS NOT NULL AND iSYS_UPDATE_SEQ IS NOT NULL THEN
    vQUERY := vQUERY || ' AND SYS_TIME_STAMP = TO_DATE (''' || iSYS_TIME_STAMP || ''')
    AND SYS_UPDATE_SEQ = ' || iSYS_UPDATE_SEQ;
    END IF;
    IF iBV_NAME IS NOT NULL AND
    iPK_FIELD IS NOT NULL AND
    iPK_VALUE IS NOT NULL THEN
    OPEN CR FOR vQUERY;
    FETCH CR INTO i;
    vRESULT := CR%FOUND;
    CLOSE CR;
    END IF;
    RETURN vRESULT;
    EXCEPTION
    WHEN OTHERS THEN
    IF CR%ISOPEN THEN
    CLOSE CR;
    END IF;
    INSERT_ERROR_LOG_PRC ('CORE_PKG', 'ORACLE', SQLCODE, SQLERRM, 'RECORD_EXISTS_FNC');
    RETURN vRESULT;
    END RECORD_EXISTS_FNC;
    So the problem is when I call this function from let's say
    database DB2 (via db remote link and synonym) and I know exactly that record does exists (because I am selecting those SYS fields before pass them in) - I get the correct result TRUE. The other programmer (Patrick) calls this function within same DB2 database, within same UserID/password (obviously different session), running exactly the same testing code and gets result FALSE (record doesn't exist, but it does !) He tried to Logoff/Login again several times within several days and try to run it and still was getting FALSE !
    I tried to Logoff/Login again and I was getting mostly TRUE and sometimes FALSE too !!!
    I thought may be It has something to do with REF CURSOR that I use to build SQL on the fly, so I changed to NDS
    using EXECUTE IMMEDIATE statement - nothing changed.
    vQUERY := 'SELECT COUNT (1) FROM ' || iBV_NAME || ' WHERE ' || iPK_FIELD || ' = ' || iPK_VALUE;
    IF iSYS_TIME_STAMP IS NOT NULL AND iSYS_UPDATE_SEQ IS NOT NULL THEN
    vQUERY := vQUERY || ' AND SYS_TIME_STAMP = TO_DATE (''' || iSYS_TIME_STAMP || ''') AND SYS_UPDATE_SEQ = ' || iSYS_UPDATE_SEQ;
    END IF;
    EXECUTE IMMEDIATE vQUERY INTO i;
    vRESULT := NOT (i = 0);
    RETURN vRESULT;
    Interesting note : when Patrick doesn't pass SYS parameters (Time_stamp, Update_sequence), or passes NULLs - function always finds the record ! (Statement 2 below)
    May be it has to do with the way TO_DATE () function gets parsed in that dynamic SQL - I don't know ...
    Here's the test code :
    SET SERVEROUTPUT ON;
    DECLARE
    SYS_TIME DATE;
    SYS_SEQ NUMBER;
    bEXISTS BOOLEAN DEFAULT FALSE;
    BEGIN
    SELECT SYS_TIME_STAMP, SYS_UPDATE_SEQ INTO SYS_TIME, SYS_SEQ FROM LOCATION_BV WHERE PK = 1;
    bEXISTS := CORE_PKG.RECORD_EXISTS_FNC ('LOCATION_BV','PK',1, SYS_TIME, SYS_SEQ); -- STATEMENT 1
    --bEXISTS := CORE_PKG.RECORD_EXISTS_FNC ('LOCATION_BV','PK',1, NULL, NULL);        -- STATEMENT 2
    IF bEXISTS THEN
    DBMS_OUTPUT.PUT_LINE ('TRUE');
    ELSE
    DBMS_OUTPUT.PUT_LINE ('FALSE');
    END IF;
    END;
    I asked our DBA, he has no clue about this strange inconsistent results.
    I debugged line by line, extracted that generated SQL and ran it in same account - works fine !
    Does anyone knows or have clues or can help what's going on ???
    I don't know If this is bug in my code or strange memory behavior ?
    (Please let me know If anything unclear)
    Thanx a lot for your help and time !
    Steve K.

    see your other thread
    Bug in my code or strange memory behavior ?

  • Reading data from a Table Cluster sans SAP code

    I need to read data at the database level from a cluster table.  That is to say, I want to decompress the VARDATA column that is in
    the database table and interpreet it with my own code.
    I've read all the SAP help documents on the subject, and I have created a test Table Cluster (the physical object) and associated test Cluster Tables (the logical tables) with the Table Cluster, but the data is compressed at the at the database level and incomprehensible.
    I realize one can use ABAP and OPEN SQL to read the table, because that goes through the SAP database interface.  I could
    also call a BAPI from an external program, but I don't want to do that.
    I need to read the data directly from the database without going through the SAP database interface or calling any SAP code.  I
    am willing to write the required code in another language, I just need to know how the data is compressed in the cluster, so I can
    decompress it.
    1. Does anyone know how to decode the information stored in a table cluster  WITHOUT using SAP code? 
    2. If no one knows how to do (1), does anyone know what compression algorithm SAP uses when storing data in the table cluster?
    3. Is there a specification or layout that explains exactly how the VARDATA column in a table cluster is structured, so that once I
    decompress it, I can figure out what data belonged to which table and column?
    If you even have a guess as to the compression algorithm or layout of VARDATA, I would be interested to hear it.
    Thank You,
    Larry Smith

    Hi All,
    The question is still open, waiting for points to be awarded.  Fidel's answer didn't really help.  I already know that I currently can't read the cluster, that's why I posted the question. 
    I would think SAP uses a known compression algorithm for the clusters, so the most important thing is finding out what the algorithm is, and finding out if SAP does anything weird to the compression headers.
    Someone has to know out there!
    Thank You,
    Larry Smith

  • How to know where the user exits or enhancement used in standard sap code?

    Hi
    I m pretty new to abap.
    How can I know where the user exits or enhancement used in standard sap code?
    As i have to add some functionality to the standard sap code. I m looking to search the enhancement or user exits used in this standard code wher i can add my functionality.
    thanks in advance.
    Moderator message : Search for available information, thread locked.
    Edited by: Vinod Kumar on Oct 19, 2011 2:38 PM

    Hi Henry,
    I don't think this is the easiest way to look at the code around a particular field on the screen. Debugging standard programs also can be very tedious, if not impossbile. So, instead of this question, I would like to find out exactly what you want to do if you know the code.
    If you are in a transaction and you want to know where the code of a particular field is, the fastest way to get to it is by pressing the F1 key on the field and then press the Technical info button on the help screen. In here you will typically see the same kind of information but it is very specific to the field you selected.
    PROGRAM(SCREEN) tells you which program is manipulating the main screen, in which your field is embedded. Remember your field may be included in a sub-screen and that subscreen may be the one included in the main screen.
    PROGRAM(SUB SCREEN) tells you which program is directly responsible for the field on the subscreen it is included in. This is where you should find the code most appropriate for the field, but not necessarily.
    PROGRAM(GUI) controls how your push buttons and the menu options in the screen behave and controlled.
    Srinivas

  • SAP:Code area="MAPPING" EXCEPTION_DURING_EXECUTE /SAP:Code

    Hi Experts.
    I'm tryin to make a JDBC Synchronous escenario, i want to UPDATE data from table in DB2 AS400, and the JDBC Update instruction returns the total of the register updated.
    All the configuration It's ready, but when I send the Update instruction, the UPDATE the information in the AS400 DB2 table, but the return message send me the next error:
    <?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
    - <!--  Call Adapter
      -->
    - <SAP:Error xmlns:SAP="http://sap.com/xi/XI/Message/30" xmlns:SOAP="http://schemas.xmlsoap.org/soap/envelope/" SOAP:mustUnderstand="1">
      <SAP:Category>Application</SAP:Category>
      <SAP:Code area="MAPPING">EXCEPTION_DURING_EXECUTE</SAP:Code>
      <SAP:P1>com/sap/xi/tf/_MM_DAT_RES_</SAP:P1>
      <SAP:P2>com.sap.aii.mappingtool.tf7.IllegalInstanceExcepti</SAP:P2>
      <SAP:P3>on: Cannot create target element /ns0:MT_DAT_RES_0</SAP:P3>
      <SAP:P4>2. Values missing in queue context. Target XSD re~</SAP:P4>
      <SAP:AdditionalText />
      <SAP:Stack>Runtime exception occurred during application mapping com/sap/xi/tf/_MM_DAT_RES_; com.sap.aii.mappingtool.tf7.IllegalInstanceException: Cannot create target element /ns0:MT_DAT_RES_02. Values missing in queue context. Target XSD re~</SAP:Stack>
      <SAP:Retry>M</SAP:Retry>
      </SAP:Error>
    Can anyone telll me about it?
    Thanks.
    Kenneth

    Hi Rao,
    Go to sxmb_moni and open your response mapping and take the payload and test your mapping. It seems the value you are mapping to /ns0:MT_DAT_RES_02 is not there. Can you please check that. You need to make sure step 4 in this blog:
    /people/bhavesh.kantilal/blog/2006/07/03/jdbc-receiver-adapter--synchronous-select-150-step-by-step
    Your response always comes up with _response and your message type should be like that only.  Also can you give your response mapping payload and the response message type here so that somebody can help you out if this didn't resolve your issue.
    Regards,
    ---Satish

  • Error in SXMB_MONI: SAP:Code area="MAPPING" EXCEPTION_DURING_EXECUTE /SAP:C

    Hi All
    When the Idoc is sent from ECC to XI after checking the message in the SXMB_MONI I get an error saying:
    <SAP:Code area="MAPPING">EXCEPTION_DURING_EXECUTE</SAP:Code>
    What is this error and how should I go about resolving it?

    Hi,
      The most probable reason is that your idoc has failed in the mapping step.
    Take the xml payload of your message from SXMB_MONI and paste it the test tab of your Message Mapping.
    Then you can run the mapping in the test tab of the message mapping, which will point you to the exact reason for the mapping failure.
    Regards,
    Ravi Kanth Talagana

  • Nullpointer exception in SAP code (RFC model related)

    Hi,
    Some threads have already been opened on this issue, but none of them give me a solution.
    The problem is that a Nullpointerexception is thrown when I create a new Input element (to bind it to the input node of my rfc model).
    As you can see in the stack trace, the nullpointerexception is thrown in SAP code.
    This happens for all function modules I've created myself (even the simplest ones with no parameters/no code), but for the SAP BAPIs it works???
    So this is not an issue related to Javaconnectors/my java code because it works for BAPIs (I'm doing exactly the same).
    I've already restarted the J2EE server, recreated the whole application, tested with new applications (to avoid any caching problems) but nothing works.
    I've been trying to resolve this issue for several hours without success. It's really frustrating.
    Any help appreciated!
    Jeroen
    java.lang.NullPointerException
         at com.sap.tc.webdynpro.modelimpl.dynamicrfc.AiiModelClass.createNewBaseTypeDescriptor(AiiModelClass.java:220)
         at com.sap.tc.webdynpro.modelimpl.dynamicrfc.AiiModelClass.descriptor(AiiModelClass.java:186)
         at com.eozen.aif.ce5solman.Z_Jver_Create_Infosheet_Input.<init>(Z_Jver_Create_Infosheet_Input.java:51)
         at com.eozen.jver.aif.Infosheets.wdDoInit(Infosheets.java:98)
         at com.eozen.jver.aif.wdp.InternalInfosheets.wdDoInit(InternalInfosheets.java:181)
         at com.sap.tc.webdynpro.progmodel.generation.DelegatingComponent.doInit(DelegatingComponent.java:95)

    I suddenly realized there is one last option and it works: I managed to sidestep the problem by doing the rfc via an R/3 SAP system that forwards the call to the CRM system. (The CRM 5.0 system is the one causing the nullpointerexception).
    Maybe some incompatibilities between J2EE/WDP SP14 & CRM 5.0?

  • How can I send purchase order through SAP mail ?

    How can I send purchase order through SAP mail ? Can any one explain whts the NACE settings?

    just  do it as  <b>Anji reddy</b> said to you   ...or else  ...  in the purchase  order trascation  ...print it  ... so that  it will generate the spool request  for that  purchase  order  ....
    so the   the belwo program is for sending <b>the Spool   Request  data   as  Email  to  any Email id  ...</b>
    The code below demonstrates how to retrieve a spool request and email it as a PDF document. Please note for the below program to process a spool request the program must be executed in background otherwise no spool request will be created. Once you have had a look at this there is an modified version of the program which works in both background and foreground. Also see transaction SCOT for SAPConnect administration.
    *& Report  ZSPOOLTOPDF                                                 *
    *& Converts spool request into PDF document and emails it to           *
    *& recipicant.                                                         *
    *& Execution                                                           *
    *& This program must be run as a background job in-order for the write *
    *& commands to create a Spool request rather than be displayed on      *
    *& screen                                                              *
    REPORT  zspooltopdf.
    PARAMETER: p_email1 LIKE somlreci1-receiver
                                        DEFAULT '[email protected]',
               p_sender LIKE somlreci1-receiver
                                        DEFAULT '[email protected]',
               p_delspl  AS CHECKBOX.
    *DATA DECLARATION
    DATA: gd_recsize TYPE i.
    * Spool IDs
    TYPES: BEGIN OF t_tbtcp.
            INCLUDE STRUCTURE tbtcp.
    TYPES: END OF t_tbtcp.
    DATA: it_tbtcp TYPE STANDARD TABLE OF t_tbtcp INITIAL SIZE 0,
          wa_tbtcp TYPE t_tbtcp.
    * Job Runtime Parameters
    DATA: gd_eventid LIKE tbtcm-eventid,
          gd_eventparm LIKE tbtcm-eventparm,
          gd_external_program_active LIKE tbtcm-xpgactive,
          gd_jobcount LIKE tbtcm-jobcount,
          gd_jobname LIKE tbtcm-jobname,
          gd_stepcount LIKE tbtcm-stepcount,
          gd_error    TYPE sy-subrc,
          gd_reciever TYPE sy-subrc.
    DATA:  w_recsize TYPE i.
    DATA: gd_subject   LIKE sodocchgi1-obj_descr,
          it_mess_bod LIKE solisti1 OCCURS 0 WITH HEADER LINE,
          it_mess_att LIKE solisti1 OCCURS 0 WITH HEADER LINE,
          gd_sender_type     LIKE soextreci1-adr_typ,
          gd_attachment_desc TYPE so_obj_nam,
          gd_attachment_name TYPE so_obj_des.
    * Spool to PDF conversions
    DATA: gd_spool_nr LIKE tsp01-rqident,
          gd_destination LIKE rlgrap-filename,
          gd_bytecount LIKE tst01-dsize,
          gd_buffer TYPE string.
    * Binary store for PDF
    DATA: BEGIN OF it_pdf_output OCCURS 0.
            INCLUDE STRUCTURE tline.
    DATA: END OF it_pdf_output.
    CONSTANTS: c_dev LIKE  sy-sysid VALUE 'DEV',
               c_no(1)     TYPE c   VALUE ' ',
               c_device(4) TYPE c   VALUE 'LOCL'.
    *START-OF-SELECTION.
    START-OF-SELECTION.
    * Write statement to represent report output. Spool request is created
    * if write statement is executed in background. This could also be an
    * ALV grid which would be converted to PDF without any extra effort
      WRITE 'Hello World'.
      new-page.
      commit work.
      new-page print off.
      IF sy-batch EQ 'X'.
        PERFORM get_job_details.
        PERFORM obtain_spool_id.
    *** Alternative way could be to submit another program and store spool
    *** id into memory, will be stored in sy-spono.
    *submit ZSPOOLTOPDF2
    *        to sap-spool
    *        spool parameters   %_print
    *        archive parameters %_print
    *        without spool dynpro
    *        and return.
    * Get spool id from program called above
    *  IMPORT w_spool_nr FROM MEMORY ID 'SPOOLTOPDF'.
        PERFORM convert_spool_to_pdf.
        PERFORM process_email.
        if p_delspl EQ 'X'.
          PERFORM delete_spool.
        endif.
        IF sy-sysid = c_dev.
          wait up to 5 seconds.
          SUBMIT rsconn01 WITH mode   = 'INT'
                          WITH output = 'X'
                          AND RETURN.
        ENDIF.
      ELSE.
        SKIP.
        WRITE:/ 'Program must be executed in background in-order for spool',
                'request to be created.'.
      ENDIF.
    *       FORM obtain_spool_id                                          *
    FORM obtain_spool_id.
      CHECK NOT ( gd_jobname IS INITIAL ).
      CHECK NOT ( gd_jobcount IS INITIAL ).
      SELECT * FROM  tbtcp
                     INTO TABLE it_tbtcp
                     WHERE      jobname     = gd_jobname
                     AND        jobcount    = gd_jobcount
                     AND        stepcount   = gd_stepcount
                     AND        listident   <> '0000000000'
                     ORDER BY   jobname
                                jobcount
                                stepcount.
      READ TABLE it_tbtcp INTO wa_tbtcp INDEX 1.
      IF sy-subrc = 0.
        message s004(zdd) with gd_spool_nr.
        gd_spool_nr = wa_tbtcp-listident.
        MESSAGE s004(zdd) WITH gd_spool_nr.
      ELSE.
        MESSAGE s005(zdd).
      ENDIF.
    ENDFORM.
    *       FORM get_job_details                                          *
    FORM get_job_details.
    * Get current job details
      CALL FUNCTION 'GET_JOB_RUNTIME_INFO'
           IMPORTING
                eventid                 = gd_eventid
                eventparm               = gd_eventparm
                external_program_active = gd_external_program_active
                jobcount                = gd_jobcount
                jobname                 = gd_jobname
                stepcount               = gd_stepcount
           EXCEPTIONS
                no_runtime_info         = 1
                OTHERS                  = 2.
    ENDFORM.
    *       FORM convert_spool_to_pdf                                     *
    FORM convert_spool_to_pdf.
      CALL FUNCTION 'CONVERT_ABAPSPOOLJOB_2_PDF'
           EXPORTING
                src_spoolid              = gd_spool_nr
                no_dialog                = c_no
                dst_device               = c_device
           IMPORTING
                pdf_bytecount            = gd_bytecount
           TABLES
                pdf                      = it_pdf_output
           EXCEPTIONS
                err_no_abap_spooljob     = 1
                err_no_spooljob          = 2
                err_no_permission        = 3
                err_conv_not_possible    = 4
                err_bad_destdevice       = 5
                user_cancelled           = 6
                err_spoolerror           = 7
                err_temseerror           = 8
                err_btcjob_open_failed   = 9
                err_btcjob_submit_failed = 10
                err_btcjob_close_failed  = 11
                OTHERS                   = 12.
      CHECK sy-subrc = 0.
    * Transfer the 132-long strings to 255-long strings
      LOOP AT it_pdf_output.
        TRANSLATE it_pdf_output USING ' ~'.
        CONCATENATE gd_buffer it_pdf_output INTO gd_buffer.
      ENDLOOP.
      TRANSLATE gd_buffer USING '~ '.
      DO.
        it_mess_att = gd_buffer.
        APPEND it_mess_att.
        SHIFT gd_buffer LEFT BY 255 PLACES.
        IF gd_buffer IS INITIAL.
          EXIT.
        ENDIF.
      ENDDO.
    ENDFORM.
    *       FORM process_email                                            *
    FORM process_email.
      DESCRIBE TABLE it_mess_att LINES gd_recsize.
      CHECK gd_recsize > 0.
      PERFORM send_email USING p_email1.
    *  perform send_email using p_email2.
    ENDFORM.
    *       FORM send_email                                               *
    *  -->  p_email                                                       *
    FORM send_email USING p_email.
      CHECK NOT ( p_email IS INITIAL ).
      REFRESH it_mess_bod.
    * Default subject matter
      gd_subject         = 'Subject'.
      gd_attachment_desc = 'Attachname'.
    *  CONCATENATE 'attach_name' ' ' INTO gd_attachment_name.
      it_mess_bod        = 'Message Body text, line 1'.
      APPEND it_mess_bod.
      it_mess_bod        = 'Message Body text, line 2...'.
      APPEND it_mess_bod.
    * If no sender specified - default blank
      IF p_sender EQ space.
        gd_sender_type  = space.
      ELSE.
        gd_sender_type  = 'INT'.
      ENDIF.
    * Send file by email as .xls speadsheet
      PERFORM send_file_as_email_attachment
                                   tables it_mess_bod
                                          it_mess_att
                                    using p_email
                                          'Example .xls documnet attachment'
                                          'PDF'
                                          gd_attachment_name
                                          gd_attachment_desc
                                          p_sender
                                          gd_sender_type
                                 changing gd_error
                                          gd_reciever.
    ENDFORM.
    *       FORM delete_spool                                             *
    FORM delete_spool.
      DATA: ld_spool_nr TYPE tsp01_sp0r-rqid_char.
      ld_spool_nr = gd_spool_nr.
      CHECK p_delspl <> c_no.
      CALL FUNCTION 'RSPO_R_RDELETE_SPOOLREQ'
           EXPORTING
                spoolid = ld_spool_nr.
    ENDFORM.
    *&      Form  SEND_FILE_AS_EMAIL_ATTACHMENT
    *       Send email
    FORM send_file_as_email_attachment tables it_message
                                              it_attach
                                        using p_email
                                              p_mtitle
                                              p_format
                                              p_filename
                                              p_attdescription
                                              p_sender_address
                                              p_sender_addres_type
                                     changing p_error
                                              p_reciever.
      DATA: ld_error    TYPE sy-subrc,
            ld_reciever TYPE sy-subrc,
            ld_mtitle LIKE sodocchgi1-obj_descr,
            ld_email LIKE  somlreci1-receiver,
            ld_format TYPE  so_obj_tp ,
            ld_attdescription TYPE  so_obj_nam ,
            ld_attfilename TYPE  so_obj_des ,
            ld_sender_address LIKE  soextreci1-receiver,
            ld_sender_address_type LIKE  soextreci1-adr_typ,
            ld_receiver LIKE  sy-subrc.
    data:   t_packing_list like sopcklsti1 occurs 0 with header line,
            t_contents like solisti1 occurs 0 with header line,
            t_receivers like somlreci1 occurs 0 with header line,
            t_attachment like solisti1 occurs 0 with header line,
            t_object_header like solisti1 occurs 0 with header line,
            w_cnt type i,
            w_sent_all(1) type c,
            w_doc_data like sodocchgi1.
      ld_email   = p_email.
      ld_mtitle = p_mtitle.
      ld_format              = p_format.
      ld_attdescription      = p_attdescription.
      ld_attfilename         = p_filename.
      ld_sender_address      = p_sender_address.
      ld_sender_address_type = p_sender_addres_type.
    * Fill the document data.
      w_doc_data-doc_size = 1.
    * Populate the subject/generic message attributes
      w_doc_data-obj_langu = sy-langu.
      w_doc_data-obj_name  = 'SAPRPT'.
      w_doc_data-obj_descr = ld_mtitle .
      w_doc_data-sensitivty = 'F'.
    * Fill the document data and get size of attachment
      CLEAR w_doc_data.
      READ TABLE it_attach INDEX w_cnt.
      w_doc_data-doc_size =
         ( w_cnt - 1 ) * 255 + STRLEN( it_attach ).
      w_doc_data-obj_langu  = sy-langu.
      w_doc_data-obj_name   = 'SAPRPT'.
      w_doc_data-obj_descr  = ld_mtitle.
      w_doc_data-sensitivty = 'F'.
      CLEAR t_attachment.
      REFRESH t_attachment.
      t_attachment[] = it_attach[].
    * Describe the body of the message
      CLEAR t_packing_list.
      REFRESH t_packing_list.
      t_packing_list-transf_bin = space.
      t_packing_list-head_start = 1.
      t_packing_list-head_num = 0.
      t_packing_list-body_start = 1.
      DESCRIBE TABLE it_message LINES t_packing_list-body_num.
      t_packing_list-doc_type = 'RAW'.
      APPEND t_packing_list.
    * Create attachment notification
      t_packing_list-transf_bin = 'X'.
      t_packing_list-head_start = 1.
      t_packing_list-head_num   = 1.
      t_packing_list-body_start = 1.
      DESCRIBE TABLE t_attachment LINES t_packing_list-body_num.
      t_packing_list-doc_type   =  ld_format.
      t_packing_list-obj_descr  =  ld_attdescription.
      t_packing_list-obj_name   =  ld_attfilename.
      t_packing_list-doc_size   =  t_packing_list-body_num * 255.
      APPEND t_packing_list.
    * Add the recipients email address
      CLEAR t_receivers.
      REFRESH t_receivers.
      t_receivers-receiver = ld_email.
      t_receivers-rec_type = 'U'.
      t_receivers-com_type = 'INT'.
      t_receivers-notif_del = 'X'.
      t_receivers-notif_ndel = 'X'.
      APPEND t_receivers.
      CALL FUNCTION 'SO_DOCUMENT_SEND_API1'
           EXPORTING
                document_data              = w_doc_data
                put_in_outbox              = 'X'
                sender_address             = ld_sender_address
                sender_address_type        = ld_sender_address_type
                commit_work                = 'X'
           IMPORTING
                sent_to_all                = w_sent_all
           TABLES
                packing_list               = t_packing_list
                contents_bin               = t_attachment
                contents_txt               = it_message
                receivers                  = t_receivers
           EXCEPTIONS
                too_many_receivers         = 1
                document_not_sent          = 2
                document_type_not_exist    = 3
                operation_no_authorization = 4
                parameter_error            = 5
                x_error                    = 6
                enqueue_error              = 7
                OTHERS                     = 8.
    * Populate zerror return code
      ld_error = sy-subrc.
    * Populate zreceiver return code
      LOOP AT t_receivers.
        ld_receiver = t_receivers-retrn_code.
      ENDLOOP.
    ENDFORM.
    Girish

  • Can we call function modules in SAP query or ADHOC query

    Hi ,
    Can we call afunction moudule in sap query or ADHOC query ?If yes How
    An early responce is greatly appreciated
    Thanks and best regards
    Rajeev Chhabra

    Hello Rajeev Chhabra,
       Yes; you can call function module in SAP Query. In InfoSet definition (SQ02), you can create additional field. In this field definition, you can add code snippet where you can function module.  
    However, this is not possible in Quick Viewer (SQVI) Query.
    Thanks,
    Venu

  • BUGS IN SAP BI 7.0

    Hi,
    I am new to this forum and am learning SAP BI 7. Can anyone tell me about the real time BUGS in SAP BI 7 and the solutions to them. I will be glad to award points.
    Regards,
    Suman

    Hi,
    this notes contain the SAPBINews for Support Packages for SAP NetWeaver 7.0 BI ABAP. They contain a list of notes that describe BI-relevant corrections and enhancements in BI Support Packages (part of SAP NetWeaver 7.0 Support Packages). This notes will be updated when other notes are added.
    Take a look:
    [SAPBINews NW7.0 BI Support Package 05|https://websmp230.sap-ag.de/sap(bD1kZSZjPTAwMQ==)/bc/bsp/spn/sapnotes/index2.htm?numm=829625]
    [SAPBINews NetWeaver 7.0 BI Support Package 06|https://websmp230.sap-ag.de/sap(bD1kZSZjPTAwMQ==)/bc/bsp/spn/sapnotes/index2.htm?numm=872278]
    [SAPBINews NetWeaver 7.0 BI Support Package 07|https://websmp230.sap-ag.de/sap(bD1kZSZjPTAwMQ==)/bc/bsp/spn/sapnotes/index2.htm?numm=872279]
    [SAPBINews NetWeaver 7.0 BI Support Package 08|https://websmp230.sap-ag.de/sap(bD1kZSZjPTAwMQ==)/bc/bsp/spn/sapnotes/index2.htm?numm=872280]
    [SAPBINews NetWeaver 7.0 BI Support Package 09|https://websmp230.sap-ag.de/sap(bD1kZSZjPTAwMQ==)/bc/bsp/spn/sapnotes/index2.htm?numm=914303]
    [SAPBINews NetWeaver 7.0 BI Support Package 10|https://websmp230.sap-ag.de/sap(bD1kZSZjPTAwMQ==)/bc/bsp/spn/sapnotes/index2.htm?numm=914304]
    [SAPBINews NetWeaver 7.0 BI Support Package 11|https://websmp230.sap-ag.de/sap(bD1kZSZjPTAwMQ==)/bc/bsp/spn/sapnotes/index2.htm?numm=914305]
    [SAPBINews NW 7.0 BI Support Package 12|https://websmp230.sap-ag.de/sap(bD1kZSZjPTAwMQ==)/bc/bsp/spn/sapnotes/index2.htm?numm=914306]
    [SAPBINews NetWeaver 7.0 BI Support Package 13|https://websmp230.sap-ag.de/sap(bD1kZSZjPTAwMQ==)/bc/bsp/spn/sapnotes/index2.htm?numm=991093]
    [SAPBINews NetWeaver 7.0 BI Support Package 14|https://websmp230.sap-ag.de/sap(bD1kZSZjPTAwMQ==)/bc/bsp/spn/sapnotes/index2.htm?numm=991094]
    [SAPBINews NetWeaver 7.0 BI Support Package 15|https://websmp230.sap-ag.de/sap(bD1kZSZjPTAwMQ==)/bc/bsp/spn/sapnotes/index2.htm?numm=991095]
    [SAPBINews NetWeaver 7.0 BI Support Package 16|https://websmp230.sap-ag.de/sap(bD1kZSZjPTAwMQ==)/bc/bsp/spn/sapnotes/index2.htm?numm=1074388]
    [SAPBINews NetWeaver 7.0 BI Support Package 17|https://websmp230.sap-ag.de/sap(bD1kZSZjPTAwMQ==)/bc/bsp/spn/sapnotes/index2.htm?numm=1106569]
    SP17 is the latest Support Package delivered with SPS15.
    Regards
    Andreas

  • How do I report a bug for SAP 3D Visual Viewer?

    How do I report a bug for SAP 3D Visual Viewer?
    I have version 8.0.100.27428, Jun 18 2014

    Hi Ellen,
    Hope you are doing good.
    The best option would be to raise a OSS incident in the component: CA-VE-VEV or CA-VE-CAD so that my colleagues can actually investigate this further and release a bug patch if needed.
    Thank you!
    Kind Regards,
    Hemanth
    SAP AGS

  • Suppressing the message generated by standard SAP code

    Hi experts,
    I have requirement in which i have to suppress the warning message generated by standard SAP code.Is it possible?
    If so how?
    Any pointers will be highly appreciated.
    Thanks,
    Rakshith

    Hi,
    Check with the functional consultant. There might be a config transaction, wherein you can specify the type of error whether Harderror' or warning etc.
    I know, Fi and MM has that.
    Regards,
    Subramanian

Maybe you are looking for

  • Missing Role Grants after datapump

    Hello OTN-Community, I have a problem with datapump. I am using some include filters to get the relevant data exported. One of these filters inlcudes the ROLES of my database which starts with a certain expression. After the export into another datab

  • Issue account assignment at item level.

    Hi Experts, I have an issue, because I have created a new order type that has to work the same that the one I have used as model however this new order type doesnu2019t work the same at item level in the view Account assignment. The new has the field

  • I have a slight problem with aiport extreme

    i have 2 airport extremes, one as the main base for internet and one up stairs for my tv and whatever. i have 3 5Ghz devices, one is xbox 360 (works great) 13" macbook pro (works great) then alienware m17x with a broadcom a/g/n card on Win 7. (not wo

  • Confusion over Engine VersionString

    I downloaded and installed the lastest 4.0.1f Patch (which wonderfully fixes my variables view window) and wanted to put some code in my program to disable the variables view if the version of TestStand the user is running is less than this patch.  W

  • Documentation for the AS3.h file

    Is there any documentation for the AS3.h file?