Standard SAP functionality to send e-mail Text on PO Output?

Hi,
I have a new requirement to send E-mail body along with the PO as an attachment to our vendors.
We are using '5' as tranmission medium to send the PO as e-mail and we call the Smart Form Interface with the Sender and Receipient information. Is there anything we can use as part of standard functionality to send e-mail text. I tried PO Title and Texts option when we define the output type, but the system doesn't seem to be picking it up.
I also tried to setup '7' as transmission medium, but when i use '7' system accepts 'MA' partner type only, when defining the condition records. But for Vendors we cannot define MA partner type in partner schema, so i am not able to define a MA partner when defining the condition record.
thanks
Udai

Hi Srini,
Sorry SDN was not available at the time i wanted to write a reply yesterday.
The way i did this was, we were using call to SMARTFORM function module in the custom print program.
When we call the SMARTFORM function module, if you have to send an e-mail, then usually you would pass the recepient information to the function module. The RECPIENT is a business obect in SAP, which has a method called add note, which is what i used to add the e-mail text. One other thing i did was, i read the e--mail text from the Text object when you define the output. Usually the name of this text object is Application concatenated with Output type (eg.: EFNEU ).
I am including the code, please go through it and let me know if you have any questions.
swc_container container.
RECIPIENT-Object
     swc_create_object recipient 'RECIPIENT' space.
Container
    swc_clear_container container.
*Address type (Internet)
    swc_set_element container 'TypeId' 'U'.
Get Vendor Email address
    SELECT smtp_addr INTO lv_smtp_addr FROM adr6
                    UP TO 1 ROWS
                    WHERE addrnumber = lfa1-adrnr AND
                          flgdefault = 'X'.
    ENDSELECT.
    address_string = lv_smtp_addr.
    swc_set_element container 'AddressString' address_string.
RECIPIENT.CreateAddress
    swc_call_method recipient 'CreateAddress' container.
Update Log
    IF sy-subrc NE 0.
      ex_retco = '1'.
      CALL FUNCTION 'NAST_PROTOCOL_UPDATE'
        EXPORTING
          msg_arbgb              = sy-msgid
          msg_nr                 = sy-msgno
          msg_ty                 = 'W'
          msg_v1                 = sy-msgv1
          msg_v2                 = sy-msgv2
          msg_v3                 = sy-msgv3
          msg_v4                 = sy-msgv4
        EXCEPTIONS
          message_type_not_valid = 1
          no_sy_message          = 2
          OTHERS                 = 3.
      EXIT.
    ENDIF.
Read textd defned in NACE
Add E-mail Body from 'Mail Texts and Title', created when creating Output Types
Text Name, usually 'EFNEU', Application and Output type concatenated
   CONCATENATE nast-kappl nast-kschl INTO obj_name.
   CALL FUNCTION 'READ_TEXT'
     EXPORTING
       id                            = c_txtid_stam
       language                      = SY-LANGU
       name                          = obj_name
       object                        = c_txtob_ocs
     IMPORTING
       header                        = header
     TABLES
       lines                         = lines_tab
    EXCEPTIONS
      ID                            = 1
      LANGUAGE                      = 2
      NAME                          = 3
      NOT_FOUND                     = 4
      OBJECT                        = 5
      REFERENCE_CHECK               = 6
      WRONG_ACCESS_TO_ARCHIVE       = 7
      OTHERS                        = 8.
   IF sy-subrc <> 0.
      CALL FUNCTION 'NAST_PROTOCOL_UPDATE'
        EXPORTING
          msg_arbgb              = sy-msgid
          msg_nr                 = sy-msgno
          msg_ty                 = 'W'
          msg_v1                 = sy-msgv1
          msg_v2                 = sy-msgv2
          msg_v3                 = sy-msgv3
          msg_v4                 = sy-msgv4
        EXCEPTIONS
          message_type_not_valid = 1
          no_sy_message          = 2
          OTHERS                 = 3.
   ENDIF.
E-mail BODY
Call 'AddNote' Method of RECIPIENT object
    swc_clear_container container.
    PERFORM replace_text_symbols USING header
                                       lines_tab.
    LOOP AT lines_tab INTO txtline.
      email_line = txtline-tdline.
      append email_line to email_body_tab.
    ENDLOOP.
    swc_set_element container 'NoteText' email_body_tab.
    swc_call_method recipient 'AddNote' container.
If E-mail body creation failed
    IF sy-subrc NE 0.
      CALL FUNCTION 'NAST_PROTOCOL_UPDATE'
        EXPORTING
          msg_arbgb              = sy-msgid
          msg_nr                 = sy-msgno
          msg_ty                 = 'W'
          msg_v1                 = sy-msgv1
          msg_v2                 = sy-msgv2
          msg_v3                 = sy-msgv3
          msg_v4                 = sy-msgv4
        EXCEPTIONS
          message_type_not_valid = 1
          no_sy_message          = 2
          OTHERS                 = 3.
    ENDIF.
Persistent RECIPIENT object
    swc_object_to_persistent recipient recipient_id.
Call the Smartform function module name
    CALL FUNCTION lv_fm_name
         EXPORTING
              control_parameters = ls_control_parameters
              mail_appl_obj      = appl_object_id
              mail_recipient     = recipient_id
              mail_sender        = sender_id
              output_options     = ls_output_options
              user_settings      = space
              ekko               = ekko
              pekko              = pekko
              t166u              = t166u
              header             = ls_header
              ls_komv            = ls_komv
              ix_subtotal        = lv_subtotal
              ix_surcharge       = lv_surcharge
              ix_tax             = lv_tax
              iv_print_tax       = lv_print_tax
              iv_comp_name       = lv_comp_name
              iv_invlp1_txt1     = lv_invlp1_txt1
              iv_invlp1_txt2     = lv_invlp1_txt2
              iv_invlp1_txt3     = lv_invlp1_txt3
         TABLES
              ekpo               = doc-xekpo
              it_text            = lt_text
              it_line            = lt_line
              it_eket            = it_eket
              it_srvc            = gt_srvc
         EXCEPTIONS
              formatting_error   = 1
              internal_error     = 2
              send_error         = 3
              user_canceled      = 4
              OTHERS             = 5.
    IF sy-subrc <> 0.
      ex_retco = '1'.
      CALL FUNCTION 'NAST_PROTOCOL_UPDATE'
        EXPORTING
          msg_arbgb              = sy-msgid
          msg_nr                 = sy-msgno
          msg_ty                 = 'W'
          msg_v1                 = sy-msgv1
          msg_v2                 = sy-msgv2
          msg_v3                 = sy-msgv3
          msg_v4                 = sy-msgv4
        EXCEPTIONS
          message_type_not_valid = 1
          no_sy_message          = 2
          OTHERS                 = 3.

Similar Messages

  • Exception handling for a standard SAP Function Module - the OO way

    Hello,
    I was wondering what is the correct way to call a standard SAP function module inside a method of global class.
    I want to display the error via the:
    get_text( ) and get_longtext( ) methods.
    I don't want to use the sy-subrc check. Is this possible?
    My example doesn't seem to work...
    See example bellow:
    DATA: ex_object_cx_root TYPE REF TO cx_root,
          ex_text TYPE string,
          ex_text_long TYPE string.
    TRY.
          CALL FUNCTION 'L_TO_CONFIRM'
            EXPORTING
              i_lgnum                        = i_lgnum      " Warehouse number
              i_tanum                        = i_tanum      " Transfer order number
              i_quknz                        = '1'          " '1' - confirm withdrawal only (picking )
              i_commit_work                  = 'X'          " Indicator whether COMMIT WORK in function module
            TABLES
              t_ltap_conf                    = it_ltap_conf " Table of items to be confirmed
            EXCEPTIONS
              to_confirmed                   = 1    " Transfer order already confirmed
              to_doesnt_exist                = 2
              item_confirmed                 = 3
              item_subsystem                 = 4
              to_item_split_not_allowed      = 51
              input_wrong                    = 52
              OTHERS                         = 53.
        CATCH cx_root INTO ex_object_cx_root.
          ex_text = ex_object_cx_root->get_text( ).
          ex_text_long = ex_object_cx_root->get_longtext( ).
          " Error:
          RAISE EXCEPTION TYPE zcx_transfer_order
            EXPORTING textid = zcx_transfer_order=>zcx_transfer_order
                 err_class = 'ZCL_WM_TRANSFER_ORDER'
                 err_method = 'CONFIRM_TO_2STEP_PICKING'
                 err_message_text = ex_text
                 err_message_text_long = ex_text_long.
      ENDTRY.
    Thank you very much in advance

    Hello Marko,
    If i understand correctly you've enclosed the call to the FM 'L_TO_CONFIRM' inside the TRY ... CATCH ... ENDTRY block.
    CATCH cx_root INTO ex_object_cx_root.
          ex_text = ex_object_cx_root->get_text( ).
          ex_text_long = ex_object_cx_root->get_longtext( ).
    You can't do this because the FM 'L_TO_CONFIRM' doesn't propagate OO exceptions!
    Your approach is almost correct, what you've to do is goes like this:
    CALL FUNCTION 'L_TO_CONFIRM'
      EXPORTING
        i_lgnum                        = i_lgnum      " Warehouse number
        i_tanum                        = i_tanum      " Transfer order number
        i_quknz                        = '1'          " '1' - confirm withdrawal only (picking )
        i_commit_work                  = 'X'          " Indicator whether COMMIT WORK in function module
      TABLES
        t_ltap_conf                    = it_ltap_conf " Table of items to be confirmed
      EXCEPTIONS
        to_confirmed                   = 1    " Transfer order already confirmed
        to_doesnt_exist                = 2
        item_confirmed                 = 3
        item_subsystem                 = 4
        to_item_split_not_allowed      = 51
        input_wrong                    = 52
        OTHERS                         = 53.
    IF sy-subrc <> 0.
      MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
              WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4
              INTO ex_text. "Get the ex_text by this technique & not by CX_ROOT->GET_TEXT()
    ENDIF.
    I'll have to check how to fetch the long text of the message
    BR,
    Suhas

  • Function to send e-mail

    Hi guys,
    somebody could tell me which is the function to send e-mail  in abap program?... have  an example with this functions?
    Thanks in advance.
    regards.
    Marisol

    Hi , this will help u.
    How to send a report to an external mail-id?
    Try this sample code :-
    REPORT ZREPORT_TO_EMAIL NO STANDARD PAGE HEADING LINE-SIZE 200.
    DATA : BEGIN OF ITAB OCCURS 0,
    PERNR LIKE PA0001-PERNR,
    ENAME LIKE PA0001-ENAME,
    END OF ITAB.
    DATA: message_content LIKE soli OCCURS 10 WITH HEADER LINE,
    receiver_list LIKE soos1 OCCURS 5 WITH HEADER LINE,
    packing_list LIKE soxpl OCCURS 2 WITH HEADER LINE,
    listobject LIKE abaplist OCCURS 10,
    compressed_attachment LIKE soli OCCURS 100 WITH HEADER LINE,
    w_object_hd_change LIKE sood1,
    compressed_size LIKE sy-index.
    START-OF-SELECTION.
    SELECT PERNR ENAME
    INTO CORRESPONDING FIELDS OF TABLE ITAB
    FROM PA0001
    WHERE PERNR < 50.
    LOOP AT ITAB.
    WRITE :/02 SY-VLINE , ITAB-PERNR, 15 SY-VLINE , ITAB-ENAME, 50
    SY-VLINE.
    ENDLOOP.
    Receivers
    receiver_list-recextnam = '[email protected]'. "-->
    EMAIL ADDRESS
    RECEIVER_list-RECESC = 'E'. "<-
    RECEIVER_list-SNDART = 'INT'."<-
    RECEIVER_list-SNDPRI = '1'."<-
    APPEND receiver_list.
    General data
    w_object_hd_change-objla = sy-langu.
    w_object_hd_change-objnam = 'Object name'.
    w_object_hd_change-objsns = 'P'.
    Mail subject
    w_object_hd_change-objdes = 'Message subject'.
    Mail body
    APPEND 'Message content' TO message_content.
    Attachment
    CALL FUNCTION 'SAVE_LIST'
    EXPORTING
    list_index = '0'
    TABLES
    listobject = listobject.
    CALL FUNCTION 'TABLE_COMPRESS'
    IMPORTING
    compressed_size = compressed_size
    TABLES
    in = listobject
    out = compressed_attachment.
    DESCRIBE TABLE compressed_attachment.
    CLEAR packing_list.
    packing_list-transf_bin = 'X'.
    packing_list-head_start = 0.
    packing_list-head_num = 0.
    packing_list-body_start = 1.
    packing_list-body_num = sy-tfill.
    packing_list-objtp = 'ALI'.
    packing_list-objnam = 'Object name'.
    packing_list-objdes = 'Attachment description'.
    packing_list-objlen = compressed_size.
    APPEND packing_list.
    CALL FUNCTION 'SO_OBJECT_SEND'
    EXPORTING
    object_hd_change = w_object_hd_change
    object_type = 'RAW'
    owner = sy-uname
    TABLES
    objcont = message_content
    receivers = receiver_list
    packing_list = packing_list
    att_cont = compressed_attachment
    with regards,
    Hema.
    pls reward if helpful.

  • Procedure or Function that send E-mail with image background and file attached

    hi
    I4d like know if someone there is a procedure or function that send E-mail with image background and file attached, for me.
    thanks
    Josi Vieira

    If you go to this part of OTN you will find the official Oracle UTL_SMTP demo, which includes attachments:
    http://technet.oracle.com/sample_code/tech/pl_sql/htdocs/Utl_Smtp_Sample.html
    Getting a background is slightly trickier. The UTL_SMTP package is for primarily sending text e-mails, whereas images require HTML e-mail. I suggest you look at the structure of a sample HTML e-mail and see if you can write the necessary HTML strings in the DATA parameter. Otherwise you'll need to investigate handcrafting a program based on the UTL_TCP package.
    [rant]
    If this seems like a lot of trouble I agree and urge you not to bother. HTML e-mail is one of the curses of the modern age, not least because it is frequently used by purveyors of viruses. I have a filter on my Outlook client that strips out all the HTML in any e-mail I receive, which means I get lots of e-mails rendered unreadable by the inclusion of <HTML> tags. But who cares, they're mostly spam anyway. In fact, the use of HTML in an e-mail is almost always an indicator of the irrelevance of its content.
    [rant]
    Vibes, APC

  • Module pool / Screen Prog is there any standard SAP functionality ?

    Hi I am creating a Module pool / Screen Prog. On this screen I have nearly 100 fileds , now I want to take print out of all the information shown on the screen for the same is there any standard SAP functionality ?
    Does SAP provides any standarar ready made functionality for the same. ?

    No, there is no standard functionality for this.  dynpros are not designed to "print out".  This is what list displays are for.  That said, you will need to write your logic to kick off  a list display with all of your field values there,  then the user can print.
    Regards,
    Rich Heilman

  • Context Menu "Send To" mail text

    Hi,
    I am trying to explore the options available with in context menu -> send to mail option inside km document explorer view. The requirement is to change the text displayed in the form which is opened when users selects context menu -> send to option in KM document explorer.
    Currently by default in mail body it shows the document link only. I am looking for changing the link to full path where the document is lying for ease of identification for users.
    Any help will be much appreciated.
    Thanks,
    Vishal

    It doesn't work, I think I'll stay at "drag & drop".
    Thank you for your help Joe.
    -grueneolive1

  • How to find the Access Key of Standard SAP Function Module

    Hi Experts,
    I have to change one sap standard function module.
    so how can i know the access key for that function module.......
    Regards,
    DS

    Contact the Basis Consultant in your project.
    The access key for standard SAP objects can be obtained from service.sap.com under Keys and Requests.
    Note 86161 - Registering developers and objects

  • SAP Cloud SDK : Send E-mail with multiple existing attachments

    Hi Experts,
    I have some requirements from our clients.
    1) Can we send email with multiple existing attachments to employee?
    I know that we can send email with attachment but how to add existing attachments to the email and send it to user.
    2) Can we enhance the standard embed component and add some standard fields under it?
    Here below under the Account TI screen Activity tab ->E-Mail Section
    I want to add the Category filed exist under the E-Mail Business object in this E-mail Section ( Account TI screen embed component )
    anyone have idea how to achieve this requirements using SDK or front end.
    Many Thanks,
    Mithun

    For the emails with attachments: How to send an email with attachments in SAP Cloud Application Studio
    For the other requirement, you need to identify wich screen is used in the section that you are referring, and see if you can add custom fields in this screen using extensibility explorer.

  • Excel form of SAP-BW reports sending via mail as an attachment

    Hi Friends,
    I want to take your opinion about a scenario....
    We access SAP-BW reports in Enterprise portal, there the user can export the report to excel.
    I wish to know if it is possible that the excel form of this report could automatically be sent as an attachment via mail to the outlook accounts of users on a daily basis. Please let me know how.
    Regards,
    Amit Srivastava

    Hi,
    1st you need to congigure the Precalculation server.Inform BASIS people to do that. After that you can check in RSPRECADMIN T-code. There you can see how many servers are there in active(green light). Save your query as workbook and then distribute that workbook from tools menu. -->it will open it in new window. there you can create new setting and then provide Email-ids in 1st tab, and provide subject line and message in 2nd tab, And finally provide variables in 3rd tab. Finnaly save it and Schedule in background by providing date & time. you can use periodic also.
    Regards
    Pcrao.

  • How do i get to know what does a standard SAP function do?

    Hi everyone,
    I'm a very new beginner level ABAP developer. Please tell me how do I know what does a standard function module do if I see it in some source code.

    go to its F1 help
    go its attributes
    observe its import and export parameters
    run the functional code through se37 with your own dummy values
    these are RnD's
    if you are not satisfied with the content then search it in sdn forums
    any way you will find about its function
    but the problem is you have to take out time

  • How to CATCH error from call to standard SAP Function Module

    Please, is it possible to catch the following error with the TRY CATCH ENDTRY construct?
    From a custom program, am calling CS_BOM_EXPL_MAT_V2.
    Several nested calls in, Form STL_DATEN_HOLEN (LCSS4F1I) calls FM CS_ALT_SELECT_MAT. 
    However, that call is missing the CALL_INVALID Exception. 
    CS_ALT_SELECT_MAT is raising CALL_INVALID, but since it was not included in the FM call, the RAISE_EXCEPTION runtime error is issued.
    I added a TRY CATCH ENDTRY construct around the call in the custom program using CATCH cx_root, but the program is still short dumping.
    All the research I have done has been misleading...some articles indicate all errors should be caught, some indicate only catchable runtime errors can be caught, others are not quite clear.
    So, I would like to find out if, in this scenario, it is even possible to catch this error and avoid the short dump.
    I will open a message to see about having the SAP code fixed as soon as I get authorization to do so, (as well as fix the data causing the issue in the first place), but in the meantime, I would like to handle it in my code if possible.
    ECC 6.0
    Thanks for any information!
    Kind Regards,
    Deb
    Edited by: Debra Garner on Jan 26, 2012 5:19 PM

    Hi Debra,
    You cannot catch non class based exceptions using the TRY/ENDTRY.  You might also find no luck with help from SAP since the FM in question 'CS_BOM_EXPL_MAT_V2' is not released for customer use.  The best bet is to examine why the error is occurring and figure out what needs to be done to fix it and/or avoid it in the future.
    Regards,
    Ryan Crosby

  • Standard SAP Table for PO Header Text and PO Item Text

    Hi,
    I want to know the Standard SAP Table where the PO Header Text and the PO Item Text are stored.
    Thanks,
    RK

    PO texts are stored in tables STXH and STXL.
    TDOBJECT is EKKO for header texts and EKPO for item texts.
    Just for future reference with regards to getting text id's etc.
    eg: PO texts.
    --> Go into the PO.
    --> Go to the text tab (item or header - depends what u want).
    --> Double click into the required text.
    --> Click the "GO TO" menu option.
    --> click Header.
    and all the info you need is there.
    You need to use function module READ_TEXT. Since lenght of text is variable it is stored in binary format and cannot be read via a table viewer.

  • HI I am attending an interview in tcs in sap abap plz send me interivew que

    Hi I am attending tcs interivew this week plz send me interivew questions wht they ask ,,,my id is [email protected] ,,,, than k u,,,

    Hi,,
    Please find a few collection of my interview ques..
    Mark if useful..
    1. How data is stored in cluster table?
    Each field of cluster table behaves as tables which contains the no. of entries.
    2. What are client dependant objects in abap/sap?
    SAP Script layout, text element, and some DDIC objects.
    3. On which even we can validate the input fields in module progams?
    In PAI (Write field statement on field you want to validate, if you want to validate group of fields put in chain and End chain statement.)
    4. In selection screen I have three fields, plant mat no and material group. If I input plant how do I get the mat no and material group based on plant dynamically?
    AT SELECTION-SCREEN ON VALUE-REQUEST FOR MATERIAL.
    CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST' to get material and material group for the plant.
    5. How do you get output from IDOC?
    Data in IDOc is stored in segments, the output from Idoc is obtained by reading the data stored in its respective segments.
    6. When top of the page event is triggered?
    After excuteing first write statement in start-of-selection event.
    7. Can we create field without data element and how?
    In SE11 one option is available above the fields strip. Data element/ direct type.
    8. How do we debug sapscript?
    Go to SE71 give lay set name , go to utilities select debugger mode on.                              
    9. Which transaction code can I used to analyze the performance of ABAP program.                              
    TCode AL21.                              
    10. How can I copy a standard table to make my own z_table.                              
    Go to transaction SE11. Then there is one option to copy table. Press that button. Enter the name of the standard table and in the Target table enter Z table name and press enter.                              
    Following are some of the answers which I gave upto my knowledge.                              
    1. What is the use of 'outerjoin'                              
    Ans. With the use of outer join you can join the tables even there is no entry in all the tables used in the view.                              
    In case of inner join there should be an entry in al the tables use in the view.                              
    2. When to use logical database?                              
    Ans. Advantage of Logical databases:                              
    less coding s required to retrieve data compared to normal internel tables.                              
    Tables used LDB are in hierarchial structure.                              
    3. What is the use of 'table index'?
    Ans .Index is used for faster access of data base tables.
    4. What is the use of 'FOR ALL ENTRIES'?
    Ans. To avoid nested select statements we use SELECT FOR ALL ENTRIES statement.
    If there r more than 10000 records SELECT FOR ALL ENTRIES is used.
    Performance wise SELECT FOR ALL ENTRIES is better to use.
    5. Can you set up background processing using CALL TRANSACTION?
    Yes,Using No Screen Mode.
    6. What are table buffers?
    Table buffers reside locally on each application server in the system. The data of buffered tables can thus be accessed
    directly from the buffer of the application server. This avoids the time-consuming process of accessing the database.
    Buffering is useful if table needs to be accessed more no. of times in a program.
    ABAP Technical Interview Questions:               
    1. What is the typical structure of an ABAP program?               
    2. What are field symbols and field groups.? Have you used "component idx of structure" clause with field groups?               
    3. What should be the approach for writing a BDC program?               
    4. What is a batch input session?               
    5. What is the alternative to batch input session?               
    6. A situation: An ABAP program creates a batch input session. We need to submit the program and the batch session in background. How to do it?               
    7. What is the difference between a pool table and a transparent table and how they are stored at the database level?               
    8. What are the problems in processing batch input sessions? How is batch input process different from processing on line?               
    9. What do you define in the domain and data element?               
    10. What are the different types of data dictionary objects?               
    11. How many types of tables exist and what are they in data dictionary?               
    12. What is the step-by-step process to create a table in data dictionary?
    13. Can a transparent table exist in data dictionary but not in the database physically?
    14. What are the domains and data elements?
    15. Can you create a table with fields not referring to data elements?
    16. What is the advantage of structures? How do you use them in the ABAP programs?
    17. What does an extract statement do in the ABAP program?
    18. What is a collect statement? How is it different from append?
    19. What is open sql vs native sql?
    20. What does an EXEC SQL stmt do in ABAP? What is the disadvantage of using it?
    21. What is the meaning of ABAP editor integrated with ABAP data dictionary?
    22. What are the events in ABAP language?
    23. What is an interactive report? What is the obvious diff of such report compared with classical type reports?
    24. What is a drill down report?
    25. How do you write a function module in SAP? Describe.
    26. What are the exceptions in function module?
    27. What is a function group?
    28. How are the date abd time field values stored in SAP?
    29. What are the fields in a BDC_Tab Table?
    30. Name a few data dictionary objects?
    31. What happens when a table is activated in DD?
    32. What is a check table and what is a value table?
    33. What are match codes? Describe?
    34. What transactions do you use for data analysis?
    35. What is table maintenance generator?
    36. What are ranges? What are number ranges?
    37. What are select options and what is the diff from parameters?
    38. How do you validate the selection criteria of a report? And how do you display initial values in a selection screen?
    39. What are selection texts?
    40. What is CTS and what do you know about it?
    41. When a program is created and need to be transported to prodn does selection texts always go with it? if not how do you make sure? Can you change the CTS entries? How do you do it?
    42. What is the client concept in SAP? What is the meaning of client independent?
    43. Are programs client dependent?
    44. Name a few system global variables you can use in ABAP programs?                              
    45. What are internal tables? How do you get the number of lines in an internal table? How to use a specific number occurs statement?                              
    46. How do you take care of performance issues in your ABAP programs?                              
    47. What are datasets?                              
    48. How to find the return code of a stmt in ABAP programs?                              
    49. What are interface/conversion programs in SAP?                              
    50. Have you used SAP supplied programs to load master data?                              
    2. Adapted from response by Maram Roja on Tuesday, June 15, 2004                              
    1. What are the techniques involved in using SAP supplied programs? Do you prefer to write your own programs to load master data? Why?                              
    2. What are logical databases? What are the advantages/disadvantages of logical databases?                              
    3. What specific statements do you using when writing a drill down report?                              
    4. What are different tools to report data in SAP? What all have you used?                              
    5. What are the advantages and disadvantages of ABAP query tool?                              
    6. What are the functional areas? User groups? How does ABAP query work in relation to these?                              
    7. Is a logical database a requirement/must to write an ABAP query?          
    8. What is the structure of a BDC sessions.          
    9. What are Change header/detail tables? Have you used them?          
    10. What do you do when the system crashes in the middle of a BDC batch session?          
    11. What do you do with errors in BDC batch sessions?          
    12. How do you set up background jobs in SAP? What are the steps? What are the event driven batch jobs?          
    13. Is it possible to run host command from SAP environment? How do you run?          
    14. What kind of financial periods exist in SAP? What is the relevant table for that?          
    15. Does SAP handle multiple currencies? Multiple languages?          
    16. What is a currency factoring technique?          
    17. How do you document ABAP programs? Do you use program documentation menu option?          
    18. What is SAPscript and layout set?          
    19. What are the ABAP commands that link to a layout set?          
    20. What is output determination?          
    ABAP Interview Questions          
    1.Without using Tcode SE11, How can we enter the values in to the table???
    2.What is the difference between Collect statement and Append Statement???
    3.What do you mean by correction and Transportation system???
    4.What is the difference between User Exits and BADI????
    5.How can we identify User exits in our screen???
    6.What do you mean by Inbound and Outbound interface???
    7.In realtime do we configure ALE systems or Administator will take care of that??
    8.How to release an object???
    9.What is the flow of a Sales document???
    10.What is the flow of Purchase order???
    12.What is the flow of Invoice???
    13.What are the standard IDOC's used???
    14.What do you mean by table control???Where will we use this???
    15.What are field symbols??Where will we use these symbols???
    Deepti
    1. There are other ways of entering data into a DB table. ex. B D C
    2. Collect statement collect/adds the records basing on a key field. allows to create summarised data sets.
    Append will append/add a record at the end of existing records
    8. to release an object - use se10/se9
    9. sales doc flow: S. A. - S. O. - Delivery - Billing
    12. Delivery - invoice.
    15. field symbols are used for dynamic allocation. at runtime u can assign a concrete field to field-symbol.
    Kishore
    1. you can go to abap editor (se38) and use insert statement for insertion update for update and modify for modifications.
    2. collect will not allow duplicate entries, while append can allow duplicates.
    3. if any changes are made to objects they are to be transported to different systems i.e, change and transport.
    4. in user exits we go by general method for enhancements while BADIs we use objects (oops concepts)
    methods for enhancement.
    14. table controls are enhanced version for step loops where we can expand rows .main difference between these two
    is step loop can be expanded to two lines table controls can`t.
    15. field symbols are just like pointers concept which are used in C language. We use them when we want to refer to
    the fields considered,it doesnt allocate any memory for it.
    Venu Rapolu     
    1. Ans: Using BDC., LSMW,,ALE., BAPI     
    2. Ans: Collect: it adds the numeric fields to the existing non numeric key field records., thereby avoiding duplicate     
    values., and append will simply adds the record     
    3 . Ans: The CTS contains work bench organizer and transport system :     
    The workbench organizer is used to record and contol changes to the ABAP/4 development objects;     
    The transport system is used to move objects from an SAP dev.system to production system     
    6. Ans: Outbound interface is used to send IDocs to the ALE server.,     
    Inbound interface is used to Analyse the received Idoc.     
    7. Ans: We (ABAPers) don't do.     
    8. Ans: se09 or se10     
    13. Ans: MATMAS     
    CREMAS     
    DEBMAS     
    GLMAST etc...     
    14. Ans: to display records in table format., we use in Screens     
    15. Ans: we assign the field content at run time with ASSIGN stmt.
    Satish D
    1. goto se16 u can view the table contents
    2. collect will collects all the numeric fields of nonnumeric field values
    append will append record at the end of table
    3. when we are creatiing new task like dev. a new prg.. after completion of dev. that will be trnsported to testing system or production system to do that we are assigning an
    transport request from our dev.class(system) by using se09
    4. badis are dev. by class and inheritence methods where as user exitsdev by SAP only and empty shells filled wit user logic
    5. go to system then status
    6. outbound generating an idoc in ale layer with master_idoc_create_messgetype,
    inbound is receivng system with idoc_inbound_process, gives an return variable wether it is sucess or not
    7. no we have to configur that
    8. go to se09 or se01 there write your task no and use release button it will asks whats the other system name
    and number enter them and relase by pressing jeep button
    9. inquiry
    quotation
    sales order                    
    shipping                    
    delivery                    
    invoice                    
    return goods                    
    12. after creation of delivry note invoice is prepared                    
    13. master_idoc_distribute will generate standard idoc                    
    Deepti                    
    I am enclosing some of answers which I know.                    
    1. We can use t.Code SE16 to enter values into table only if table maintainence is allowed for that table.                    
    2. Append will add new entries into the table where as collect add into the numeric type fields if other charatcer fields                    
    matches to your selection criteria.                    
    3. CTS used for creation of ABAP development transport requests.The transaction code for this is SE10.                    
    4. UserExits r used for adding additional functionality to the existing SAP standard transactions.Using UserExits we can add additional functionality standard SAP functionality without making any changes to the original code.BADI is a standardized interface for ABAP sources that enables partners and customers to enhance SAP-delivered programs in their namespace.                    
    5 .We can identify User exits by using transactions CMOD and SMOD.               
    6. After entering transaction code SE10 select the transport request which u want to transport and click on transport icon(Truck symbol) to release it.               
    10. Purchase Requistion->RFQ->Vendor Evaluation->Purchase Order(ME21).               
    14. Table control is the only facility provide thru dialog programming when we come acrosse the use of updating standared,deletion,insertion and all database operations.               
    15. Field symbols r pointers to the existing data types(like 'C') which does not allocate any memory space. These are used faster access of data.               
    Answers to some ABAP Interview Questions:               
    Questions which I have faced in an interview:               
    1) What is runtime analysis? Have you used this?               
    2) What is meant by performance analysis? Have done anything to improve the performance?               
    3) How to transfer the objects? Have to transferred any objects?               
    4) How did you test the developed objects?               
    5) What is the difference between SAP Memory and ABAP Memory?               
    6) In order to upload Purchase order details, how you handle multiple values for a single field?               
    Eg: Item field may contain no. of values for a record               
    7) What is the procedure you followed to upload the data?               
    8) How did you handle errors in Call Transaction?
    9) Among the Call Transaction and Session Method, which is faster?
    10) What are the difference between Interactive and Drill Down Reports?
    11) How to pass the variables to forms?
    12) How to create a link between modified form and modified print program?
    13) What is the table, which contain the details of all the name of the programs and forms?
    14) How did you test the form u developed? How did you taken print?
    15) What are Standard Texts?
    16) What is the difference between Clustered Tables and Pooled Tables?
    17) What is pf-status?
    18) Among "Move" and "Move Corresponding", which is efficient one?
    19) What are the output type and Tcodes?
    20) Where we use Chain and Endchain?
    21) Do you use select statement in loop endloop, how will be the performance? To improve the performance?
    22) In select-options, how to get the default values as current month first date and last date by default?
    Eg: 1/12/2004 and 31/12/2004
    Go thru these answers:          
    1) What is runtime analysis? Have you used this?          
    It's checks program execution time in microseconds. When you go to se30.if you give desired program name in performance file. It will take you to below screen. You can get how much past is your program.          
    2) What is meant by performance analysis? Have done          
    3) How to transfer the objects? Have you transferred any objects?          
    4) How did you test the developed objects?          
    I was testing a developed object. There are two types of testing          
    - Negative testing          
    - Positive testing          
    In negative testing we will give negative data in input and we check any errors occurs.          
    In positive testing we will give positive data in input for checking errors.          
    8) How did you handle errors in Call Transaction?
    We can create a internal table like 'bsgmcgcoll'. All the messages will go to internal table. We can get errors in this internal table.
    Below messages are go to internal table. when you run the call transaction.
    - Message type
    - Message id
    - Message Number
    - Variable1
    - Variable2
    - Variable3
    9) Among the Call Transaction and Session Method, which is faster?
    Call transaction is faster then session method. But usually we use session method in real time...because we can transfer large amount of data from internal table to database and if any errors in a session. Process will not complete until session get correct.
    10) What are the difference between Interactive and Drill Down Reports?
    ABAP/4 provides some interactive events on lists such as AT LINE-SELECTION (double click) or AT USER-COMMAND (pressing a button). You can use these events to move through layers of information about individual items in a list.
    Drill down report is nothing but interactive report...drilldown means above paragraph only.
    11) How to pass the variables to forms?
    12) What is the table, which contain the details of all the name of the programs and forms?
    Table contains vertical and horizontal lines. We can store the data in table as blocks. We can scroll depends upon your wish. And these all are stored in database (data dictionary).
    Which contain the details of all the name of the programs and forms? (I don't know).
    13) How did you test the form u developed? How did you taken print?
    14) What are Standard Texts?
    16) What is the difference between Clustered Tables and Pooled Tables?
    A pooled table is used to combine several logical tables in the ABAP/4 dictionary. Pooled tables are logical tables that must be assigned to a table pool when they are defined.
    Cluster table are logical tables that must be assigned to a table cluster when they are defined.
    Cluster table can be used to store control data they can also used to store temporary data or text such as documentation.
    17) What is pf-status?
    Pf status is used in interactive report for enhancing the functionality. If we go to se41, we can get menus, items and different function keys, which we are using for secondary list in interactive report.
    18) Among "Move" and "Move Corresponding", which is efficient one?
    I guess, 'move corresponding' is very efficient then 'move' statement. Because usually we use this stamtent for internal table fields only...so if we give move corresponding. Those fields only moving to other place (what ever you want).
    19) What are the output type and Tcodes?
    20) Where we use Chain and End chain?
    21) Do you use select statement in loop end loop, how will be the performance? To improve the performance?                    
    22) In select-options, how to get the default values as current month first date and last date by default?                    
    Eg: 1/12/2004 and 31/12/2004                    
    SAP ABAP interview questions                    
    Thanks to the reader who sent in this question set:                    
    1. What is an ABAP data dictionary?- ABAP 4 data dictionary describes the logical structures of the objects used in application development and shows how they are mapped to the underlying relational database in tables/views.                    
    2. What are domains and data element?- Domains:Domain is the central object for describing the technical characteristics of an attribute of an business objects. It describes the value range of the field. Data Element: It is used to describe the semantic definition of the table fields like description the field. Data element describes how a field can be displayed to end-user.                    
    3. What is foreign key relationship?- A relationship which can be defined between tables and must be explicitly defined at field level. Foreign keys are used to ensure the consistency of data. Data entered should be checked against existing data to ensure that there are now contradiction. While defining foreign key relationship cardinality has to be specified. Cardinality mentions how many dependent records or how referenced records are possible.                    
    4. Describe data classes.- Master data: It is the data which is seldomly changed. Transaction data: It is the data which is often changed. Organization data: It is a customizing data which is entered in the system when the system is configured and is then rarely changed. System data:It is the data which R/3 system needs for itself.                    
    5. What are indexes?- Indexes are described as a copy of a database table reduced to specific fields. This data exists in sorted form. This sorting form ease fast access to the field of the tables. In order that other fields are also read, a pointer to the associated record of the actual table are included in the index. Yhe indexes are activated along with the table and are created automatically with it in the database.                    
    6. Difference between transparent tables and pooled tables.- Transparent tables: Transparent tables in the dictionary has a one-to-one relation with the table in database. Its structure corresponds to single database field. Table in the database has the same name as in the dictionary. Transparent table holds application data. Pooled tables. Pooled tables in the dictionary has a many-to-one relation with the table in database. Table in the database has the different name as in the dictionary. Pooled table are stored in table pool at the database level.                    
    7. What is an ABAP/4 Query?- ABAP/4 Query is a powerful tool to generate simple reports without any coding. ABAP/4 Query can generate the following 3 simple reports: Basic List: It is the simple reports. Statistics: Reports with statistical functions like Average, Percentages. Ranked Lists: For analytical reports. - For creating a ABAP/4 Query, programmer has to create user group and a functional group. Functional group can be created using with or without logical database table. Finally, assign user group to functional group. Finally, create a query on the functional group generated.                    
    8. What is BDC programming?- Transferring of large/external/legacy data into SAP system using Batch Input programming. Batch input is a automatic procedure referred to as BDC(Batch Data Communications).The central component of the transfer is a queue file which receives the data vie a batch input programs and groups associated data into "sessions".                    
    9. What are the functional modules used in sequence in BDC?- These are the 3 functional modules which are used in a sequence to perform a data transfer successfully using BDC programming: BDC_OPEN_GROUP - Parameters like Name of the client, sessions and user name are specified in this functional modules. BDC_INSERT - It is used to insert the data for one transaction into a session. BDC_CLOSE_GROUP - This is used to close the batch input session.                    
    10. What are internal tables?- Internal tables are a standard data type object which exists only during the runtime of the program. They are used to perform table calculations on subsets of database tables and for re-organising the contents of database tables according to users need.                    
    11. What is ITS? What are the merits of ITS?- ITS is a Internet Transaction Server. ITS forms an interface between HTTP server and R/3 system, which converts screen provided data by the R/3 system into HTML documents and vice-versa. Merits of ITS: A complete web transaction can be developed and tested in R/3 system. All transaction components, including those used by the ITS outside the R/3 system at runtime, can be stored in the R/3 system. The advantage of automatic language processing in the R/3 system can be utilized to language-dependent HTML documents at runtime.                    
    12. What is DynPro?- DynPro is a Dynamic Programming which is a combination of screen and the associated flow logic Screen is also called as DynPro.
    13. What are screen painter and menu painter?- Screen painter: Screen painter is a tool to design and maintain screen and its elements. It allows user to create GUI screens for the transactions. Attributes, layout, filed attributes and flow logic are the elements of Screen painter. Menu painter: Menu painter is a tool to design the interface components. Status, menu bars, menu lists, F-key settings, functions and titles are the components of Menu painters. Screen painter and menu painter both are the graphical interface of an ABAP/4 applications.
    14. What are the components of SAP scripts?- SAP scripts is a word processing tool of SAP which has the following components: Standard text. It is like a standard normal documents. Layout sets. - Layout set consists of the following components: Windows and pages, Paragraph formats, Character formats. Creating forms in the R/3 system. Every layout set consists of Header, paragraph, and character string. ABAP/4 program.
    15. What is ALV programming in ABAP? When is this grid used in ABAP?- ALV is Application List viewer. Sap provides a set of ALV (ABAP LIST VIEWER) function modules which can be put into use to embellish the output of a report. This set of ALV functions is used to enhance the readability and functionality of any report output. Cases arise in sap when the output of a report contains columns extending more than 255 characters in length. In such cases, this set of ALV functions can help choose selected columns and arrange the different columns from a report output and also save different variants for report display. This is a very efficient tool for dynamically sorting and arranging the columns from a report output. The report output can contain up to 90 columns in the display with the wide array of display options.
    16. What are the events in ABAP/4 language?- Initialization, At selection-screen, Start-of-selection, end-of-selection, top-of-page, end-of-page, At line-selection, At user-command, At PF, Get, At New, At LAST, AT END, AT FIRST.
    17. What is CTS and what do you know about it?- The Change and Transport System (CTS) is a tool that helps you to organize development projects in the ABAP Workbench and in Customizing, and then transport the changes between the SAP Systems and clients in your system landscape. This documentation provides you with an overview of how to manage changes with the CTS and essential information on setting up your system and client landscape and deciding on a transport strategy. Read and follow this documentation when planning your development project.
    18. What are logical databases? What are the advantages/ dis-advantages of logical databases?- To read data from a database tables we use logical database. A logical database provides read-only access to a group of related tables to an ABAP/4 program. Advantages: i)check functions which check that user input is complete, correct,and plausible. ii)Meaningful data selection. iii)central authorization checks for database accesses. iv)good read access performance while retaining the hierarchical data view determined by the application logic. dis advantages: i)If you donot specify a logical database in the program attributes,the GET events never occur. ii)There is no ENDGET command,so the code block associated with an event ends with the next event statement (such as another GET or an END-OF-SELECTION).
    19. What is a batch input session?- BATCH INPUT SESSION is an intermediate step between internal table and database table. Data along with the action is stored in session ie data for screen fields, to which screen it is passed, program name behind it, and how next screen is processed.
    20. How to upload data using CATT ?- These are the steps to be followed to Upload data through CATT: Creation of the CATT test case & recording the sample data input. Download of the source file template. Modification of the source file. Upload of the data from the source file.
    21. What is Smart Forms?- Smart Forms allows you to create forms using a graphical design tool with robust functionality, color, and more. Additionally, all new forms developed at SAP will be created with the new Smart Form solution.
    22. How can I make a differentiation between dependent and independent data?- Client dependent or independent transfer requirements include client specific or cross client objects in the change requests. Workbench objects like SAPscripts are client specific, some entries in customizing are client independent. If you display the object list for one change request, and then for each object the object attributes, you will find the flag client specific. If one object in the task list has this flag on, then that transport will be client dependent.
    23. What is the difference between macro and subroutine? - Macros can only be used in the program the are defined in and only after the definition are expanded at compilation / generation. Subroutines (FORM) can be called from both the program the are defined in and other programs . A MACRO is more or less an abbreviation for some lines of code that are used more than once or twice. A FORM is a local subroutine (which can be called external). A FUNCTION is (more or less) a subroutine that is called external. Since debugging a MACRO is not really possible, prevent the use of them (I've never used them, but seen them in action). If the subroutine is used only local (called internal) use a FORM. If the subroutine is called external (used by more than one program) use a FUNCTION.
    Rajiv

  • PO output type to send a mail  to the user along with PO output as PDF file

    Hi Friends,
    I have one requirement from client.
    Client wants the PO output to be converted to PDF format and sent to User while doing the PO release through e-mail. Can anybody guide me how to Configure a New Output Type and convert the PO output into PDF and send to User through e-mail.
    Thanks
    Nazer

    This can be done with the standard form itself.
    first find out the output type u r using.
    Then goto T-code NACE and then choose EF- purchase order and then select the output type u r using.
    Then goto the 'processing Routines' at the lefe side of the screen.
    There u can find out the output forms for this output typr u r using. Here add 'Simple mail-7' in the list and then give the program name and the smartform or the script u r using.
    We can also give the mail texts for this output form.
    After that goto ME22N and then choose the 'Messages' tab and then click the simple mail and in the 'communication method' kindly provide the mail id for which the PO mail has to be sent.
    And then the mail can be viewed in the inbox of the recipient.
    in this way we can sent the PO mail to the corresponding mail address,.
    I guess this will solve ur issue.
    Thanks and Regards
    Siva
    Edited by: Sivaprakash R on Apr 20, 2009 1:00 PM
    Edited by: Sivaprakash R on Apr 20, 2009 1:00 PM

  • Query on Function Module for conversion of text - language specific

    Hi,
    In my interface program i have query regarding CDHDR table.
    Problem: Object Class(CDHDR-OBJECTCLAS). The technical name of the object name shall
    be translated to meaningful business text
    For EXample.  I am getting the value for the field OBJECTCLAS is EINKBELEG shall be converted as 'Purchasing Document'
    Kindly suggest me if there any standard SAP function module is available to convert the German text into English

    Hi,
    to pass the internal table to a tables parameter
    both must be of same type
    if both are of same type
    u can use INT1[] = INT2[] to pass internal table value to internal table of FM
    if structures are not same then
    u will have to loop thru int1 and move values selectively to int2 and everytime append int2
    this should sove ur prob
    tc
    saji

Maybe you are looking for