How to call a Include type Report Program in Executable Program. ?

Hi experts,
I have created a Include type report program and I want to run this include program in other report program. Which abap statement should i use ?
Thanks
Saurabh

Hi Saurabh,
We can make use of programs of Type - Include(I) in other type of ABAP Programs.
These Include programs cannot be executed directly but can be used as a part of the main program i.e Executable program - Type E.
So after creating your main program of type executable program then use the below line
REPORT ZM_SAMPLE_PROGRAM.
INCLUDE INC_PRG_NAME.
Now the code as availablein INC_PRG_NAME becomes part of the  main program ZM_SAMPLE_PROGRAM.le
Also you can make use of this Include program in other executable/include programs too...
Regards,
Rafi

Similar Messages

  • How to call LSMW from a Report program

    Hi,
    I have a requirment of extending vendor master data (Companycode data and Purchasing Organization data ) through Tcode XK02 using LSMW.Also I need to generate an error log file for validating the data from flat file and  must have an export option of the error log file.
    Can you help me how to proceed on this in steps.
    Also pls let me know how to call LSMW transaction through a Report.
    Based on the selection criteria I need to maintain two source structues,one for companycode data and the other for Purchasing Orgnization data for uploading  data thru LSMW.How to do this?
    pls respond ASAP,
    Thanks,
    Nagendra

    Hi,
    create 2 LSMW object (under same project and subproject)..
    one for extended vendor master data for company code data and other for  extended purchase organization data for company code data.
    Now check the radio buttons and based on that populate ur LSMW object.
    Store project
      project = < >.
    Store subproject
      subproj = < >.
    Store object
      object  = '6GSC022_TS3'.
    if r_ccode = 'X'.
    Store object
      object  = < >.
    else.
    Store object
      object  = < >.
    endif.
    Call the function module to display object (LSMW) maintenance screen
      CALL FUNCTION '/SAPDMC/LSM_OBJ_STARTER'
        EXPORTING
          project        = project
          subproj        = subproj
          object         = object
        EXCEPTIONS
          no_such_object = 1
          OTHERS         = 2.
    Generating error log:
    After the checking the field if u think for this u need to generate error message then In the Maintain Field Mapping and Conversion Rules option under the required field write the following code:
    data: v_msgtxt(100) type c.
    message  <msg ID>    <message type>   <message no>
                     with   <var1>  <var2>
                     into v_msgtxt.
    write v_msgtxt.
    Follow the next step in LSMW object till you reach the option  Convert Data.
    After you execute this option you will get the desired message here.
    Regards,
    Joy.

  • How to call Outbound interface using report programs

    Hi experts,
        i want to call outbound i/f prog using 2 report programs...one report prg passing 2 parameters to outbond i/f prg & another report prg simply calling the outbond i/f prg... either report1 or report2 call this outbond i/f prg.
    for instance,
    1.report1 has following parameters                                            
             param: tknum,vbeln
    2.report2 does not have any parameters
             No param
    3.outbound i/f prog for some calculation
    points will be given..............
    thanks in advance,
    regards
    vijay

    Hi vijay,
         To call a program in another program you have to use the Keyword <b>Submit</b>.
    EX; Report zprg.
          SUBMIT zprg1.
       So, where you require a program you can call that program by this keyword.
    Regards,
    Narendra.

  • How to call subroutines defined in ABAP program with type S

    how to call subroutines defined in ABAP program with type S? can you give an example?

    Normal executable program,
    REPORT  ZTEST_MAIN.
    perform sub1 in program ztest_sub.
    "you can call using in program addition
    Subroutine pool program
    PROGRAM  ZTEST_SUB.
    form sub1.
    endform.

  • How to do the Validations in Report Programming?

    How to do the Validations in Report Programming?
    how to do screen Validations and Field Validations if posssible can any one send the code regarding the Validation ....
    Tks
    Durusoju

    AT SELECTION-SCREEN - selscreen_event
    Syntax
      | { ON {para|selcrit} }
      | { ON END OF selcrit }
      | { ON BLOCK block }
      | { ON RADIOBUTTON GROUP radi }
      | { }
      | { ON {HELP-REQUEST|VALUE-REQUEST}
      |   FOR {para|selcrit-low|selcrit-high} }
      | { ON EXIT-COMMAND }.
    Alternatives:
    1. ... OUTPUT
    2. ... ON {para|selcrit}
    3. ... ON END OF selcrit
    4. ... ON BLOCK block
    5. ... ON RADIOBUTTON GROUP radi
    6. ... { }
    7. ... ON {HELP-REQUEST|VALUE-REQUEST} FOR
          {para|selcrit-low|selcrit-high} }
    8. ... ON EXIT-COMMAND
    Effect
    These additions allow individual evaluation of specific elements of the selection screens of the program. The information as to which selection has triggered the event is contained in the system field sy-dynnr.
    Alternative 1
    ... OUTPUT
    Effect
    This event is triggered at the screen event PBO of a selection screen. In the event block, the selection screen can be prepared through assignments to the data objects of parameters and selection criteria and through dynamic screen modifications.
    Note
    The assignments to input fields in the event block AT SELECTION-SCREEN OUTPUT always affect the selection screen and overwrite the user inputs from previous displays of the same selection screen. Assignments in the event blocks LOAD-OF-PROGRAM oder INITIALIZATION, on the other hand, only have an effect at first program start.
    Alternative 2
    ... ON {para|selcrit}
    Effect
    This event is triggered at the screen event PAI of a selection screen if the content of the input field of a parameter para or a line of a selection criterion selcrit was passed to the ABAP program. In the event block, the user input can be checked. Sending a warning or an error message in the event block makes the fields para and selcrit ready for input again.
    No parameter that is defined as a radio button can be specified. For this purpose, the addition ON RADIOBUTTON GROUP is provided.
    Note
    If a user action takes place in the dialog box for the multiple selection of a selection criterion selcrit, the entries of the selection table are passed to the program, line by line. For each line, the event AT SELECTION-SCREEN ON selcrit is triggered.
    Alternative 3
    ... ON END OF selcrit
    Effect
    This event is triggered after the selection table selcrit has been fully passed to the program after a user action in the dialog box for the multiple selection has taken place. In the event block, the entire selection table can be checked.
    Alternative 4
    ... ON BLOCK block
    Effect
    This event is triggered at the screen event PAI of a selection screen if all the input fields of a block block of the selection screen were passed to the ABAP program. In the event block, the user inputs can be checked. Sending a warning or an error message in the event block makes all the fields of the block block ready for input again.
    Alternative 5
    ... ON RADIOBUTTON GROUP radi
    Effect
    This event is triggered at the screen event PAI of a selection screen if all the fields of a radio button group radi of the selection screen were passed to the ABAP program. In the event block, the user input can be checked. Sending a warning or error message in the event block makes all the radion buttons of the block radi ready for input again.
    Note
    The individual fields of a radio button group are not passed individually and do not trigger the event AT SELECTION-SCREEN ON par.
    Alternative 6
    Effect
    The event AT SELECTION-SCREEN itself is triggered as the last event of selection screen processing if all the input values were passed to the program. In this event block, all the user inputs can be checked. Sending a warning or an error message in the event block makes all the screen fields ready for input once again.
    Alternative 7
    ... ON { HELP-REQUEST | VALUE-REQUEST } FOR
        {para|selcrit-low|selcrit-high} }
    Effect
    The two events ON HELP-REQUEST and ON VALUE-REQUEST are triggered at the screen events POH and POV of a selection screen if - for the input field of a parameter para or one of the input fields of a selection criterion selcrit - the field help F1 or the input help F4 was called. Other selection events are not triggered.
    In the event blocks, a self-defined field or input field can be programmed, which overrides any helps possibly defined in the ABAP Dictionary.
    Notes
    These event blocks can only be implemented for fields of the selection screen that are defined in the same ABAP program and not in a possibly linked logical database.
    With the events for the field and input help, no data is transported between the selection screen and the ABAP program. As with general screens, suitable function modules must be used for these. The parameters and selection criteria changed for the input help are transported to the selection screen.
    Alternative 8
    ... ON EXIT-COMMAND
    Effect
    This event is triggered if the user has called one of the functions Back, Exit or Cancel. In the event block, possible clean-up actions can be executed.
    Example
    In these executable programs, a standard selection screen and a further selection screen are defined. In the event blocks AT SELECTION-SCREEN, the inputs in the selection screens can be specially handled using the name p_carrid and the screen number in sy-dynnr.
    REPORT demo_at_selection_screen.
    Global data
    DATA: sflight_tab TYPE TABLE OF sflight,
          sflight_wa  LIKE LINE  OF sflight_tab.
    Selection screens
    PARAMETERS p_carrid TYPE spfli-carrid.
    SELECTION-SCREEN BEGIN OF SCREEN 500.
      SELECT-OPTIONS s_conn FOR sflight_wa-connid.
      DATA s_conn_wa LIKE LINE OF s_conn.
    SELECTION-SCREEN END OF SCREEN 500.
    Handling selection screen events
    AT SELECTION-SCREEN ON p_carrid.
      IF p_carrid IS INITIAL.
        MESSAGE 'Please enter a value' TYPE 'E'.
      ENDIF.
      AUTHORITY-CHECK OBJECT 'S_CARRID'
                          ID 'CARRID' FIELD p_carrid
                          ID 'ACTVT'  FIELD '03'.
      IF sy-subrc = 4.
        MESSAGE 'No authorization for carrier' TYPE 'E'.
      ELSEIF sy-subrc <> 0.
        MESSAGE 'Error in authority check' TYPE 'A'.
      ELSE.
        IF sy-ucomm = 'ONLI'.
          CALL SELECTION-SCREEN '0500'.
        ENDIF.
      ENDIF.
    AT SELECTION-SCREEN.
      IF sy-dynnr = '0500'.
        IF s_conn IS INITIAL.
          MESSAGE 'Please enter values' TYPE 'W'.
        ELSE.
          SELECT *
                 FROM sflight
                 INTO TABLE sflight_tab
                 WHERE carrid = p_carrid AND
                       connid IN s_conn.
          IF sy-subrc <> 0.
            MESSAGE 'No flights found' TYPE 'E'.
          ENDIF.
        ENDIF.
      ENDIF.
    Main program
    START-OF-SELECTION.

  • How to call an include in a field Exit?

    Hi Guys,
                  i am having a doubt ,How to call an Include in a field Exit function module.
                i wrote as "include zxx_incl." but if i wrote like this in my Field Exit i am getting a Suntax error
    "Recursive INCLUDE nesting in program "ZFLDEXIT_INCL". It contains an
    INCLUDE statement which calls itself or a previously read program
    ("ZFLDEXIT_INCL                           ").
    '                 i am having other doubt while creating an include program does we need to write a 1st statement as include zxx-incl within the same include ZXX_incl? if not i am getting a syntaxt error.
    thanks,
    Gopi.

    Yes, thats the problem.
    Your include is named ZFLDEXIT_INCL and in the first line of that include you probbaly wrote
    include ZFLDEXIT_INCL.
    Delete that, includes don't need a reserved word like programs and reports

  • How to call a Method in a Program?

    Hello,
    I am very new to the ABAP world.  I have been given a task to call a method if_hrbas_plain_infotype_access~read_single from the class CL_HRBAS_PLAIN_INFOTYPE_ACCESS in a program to see if we can use it to display some employee information.  I don't know how to call a method in a program.  Can somebody please provide me some pseudo code or instructions?
    Thanks.

    Hi Shan,
    here is the code to call a method. while calling the method Instance as 'r_info' which is the type reference to class as specified.
    pass the values to exporting parameters plvar,otype,objid...etc  according  to the requirement
    infotypes: 0002.   " creates an internal table p0002.
    data:
    r_info type ref to CL_HRBAS_PLAIN_INFOTYPE_ACCESS.
    TRY.
    CALL METHOD r_info->if_hrbas_plain_infotype_access~read
       EXPORTING
         plvar           = 
         otype           =
         objid           =
         istat           =
         infty           =
    *     SUBTY           =
         begda           =
         endda           =
         no_auth_check   =  'X'
         message_handler =
       IMPORTING
         PNNNN_TAB       = P0002
    *     HRTNNNN_TAB     =
    *     IS_OK           =
      CATCH CX_HRBAS_VIOLATED_ASSERTION .
    ENDTRY.
    LOOP AT P0002.
          WRITE:/
            P0002-VORNA,
            P0002-NCHMC,
            P0002-NACHN.
        ENDLOOP.
    Regards

  • How to call a form from report? in 6i

    How to call a Form from Report? In Developer 6i of oracle. Plz tell me tex.

    try this
    declare
       AppID PLS_INTEGER;
    begin
         AppID := DDE.App_Begin('ifrun60 module=myform.fmx userid=scott/tiger@mydb maximize=no', DDE.App_Mode_Maximized);
    exception when others then
          srw.message(1,'Errror');
    end;Baig
    [My Oracle Blog|http://baigsorcl.blogspot.com/]

  • How to call a idoc in abap program and updates catsdb table

    how to call a idoc in abap program and updates catsdb table
    thank you,
    Jagrut BharatKumar Shukla

    Hi Kishan,
    You can refer to following help document,
    http://help.sap.com/saphelp_nw04/helpdata/en/bf/d005244e9d1d4d92b2fe7935556b4c/content.htm
    Regards,
    Meera

  • How to call Operating System commands / external programs from within APEX

    Hi,
    Can someone please suggest how to call Operating Systems commands / external programs from within APEX?
    E.g. say I need to run a SQL script on a particular database. SQL script, database name, userid & password everything is available in a table in Oracle. I want to build a utility in APEX where by when I click a button APEX should run the following
    c:\oracle\bin\sqlplusw.exe userud/password@database @script_name.sql
    Any pointers will be greatly appreciated.
    Thanks & Regards,

    Hi Guys,
    I have reviewed the option of using scheduler and javascript and they do satisfy my requirements PARTIALLY. Any calls to operating system commands through these features will be made on the server where APEX is installed.
    However, here what I am looking at is to call operating systems programs on client machine. For example in my APEX application I have constructed the following strings of commands that needs to be run to execute a change request.
    sqlplusw.exe user/password@database @script1.sql
    sqlplusw.exe user/password@database @script2.sql
    sqlplusw.exe user/password@database @script3.sql
    sqlplusw.exe user/password@database @script4.sql
    What I want is to have a button/link on the APEX screen along with these lines so that when I click that link/button this entire line of command gets executed in the same way it would get executed if I copy and paste this command in the command window of windows.
    Believe me, if I am able to achieve what I intend to do, it is going to save a lot of our DBAs time and effort.
    Any help will be greatly appreciated.
    Thanks & Regards,

  • How to Call complex data type in ALBPM

    Hi,
    I want to call webservice. I took wsdl from other system(example MessageBroker or OSB).Now that wsdl file is referring to internal xsd.
    The input format of wsdl(webservice) is just like:-
    <SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
    <SOAP-ENV:Body>
    <m:POCInput xmlns:m="http://www.pocforvineet.com/donebysudarshanhebbar/s3/techodc">
    <m:PDMID>String</m:PDMID>
    <m:CompanyNumber>String</m:CompanyNumber>
    </m:POCInput>
    </SOAP-ENV:Body>
    </SOAP-ENV:Envelope>
    now when i call that webservice in OBPM after following the steps(catalog->new Module->webservice-> browse wsdl file and import it) & drag & drop method to call
    <b>getSuccess(POCMessageSetService, pocInput : null, out pocOutput : pocOutput) //method to call
    pocMessageSetService = CallingComponent.CallingSud.POC_WSDLService.POCMessageSetService(endPoint : "http://localhost:7001/WebPOC/CallALSB") </b>
    It is expecting xmlObject or java object in <b>pocInput</b>
    now how to call this complex type in OBPM.
    Please help me out in this case.
    Thanx in advance
    Regards,
    Vinny

    1. Have you created an XSD for the XML? (there is a free conversion utility on http://www.hitsw.com/xml_utilites/ that does this)
    2. Have you tried cataloging the XML's XSD into the catalog? (create a new module in the catalog -> right mouse click the module -> in "Catalog Component" -> "XML Schema")
    3. Have your right moused clicked the newly created XML that you just cataloged -> clicked "Create Heir" to create a new object that has the "load()" method?
    Dan

  • Can we call a BDC from REPORT program.

    hi
    can anybody tell me that
    can we call a BDC from REPORT program.
    thanks&regards

    Yes, It can be called.
    Infact you can generate a program from SHDB recording and in the program generated you can put necessary report logic and call the BDC/CALL TRANSACTION as required.
    <b>Please check here for a sample program,</b>
    http://www.sapdevelopment.co.uk/bdc/bdc_ctcode.htm
    Regards
    Kathirvel

  • How to Trace oracle Host Type concurrent program

    How to Trace oracle Host Type concurrent program
    I have enabled trace in concurrent definition screen but couldnt get the trace file
    the Host script executes multiple plsql packages for interfaces and sent emails

    Hi,
    How to Trace oracle Host Type concurrent programSee (FAQ: Common Tracing Techniques within the Oracle Applications 11i/R12 [ID 296559.1]) -- 4. How does one enable trace for a concurrent program?
    I have enabled trace in concurrent definition screen but couldnt get the trace fileDo you mean the trace file is not generated?
    the Host script executes multiple plsql packages for interfaces and sent emailsIs this a seeded or custom concurrent program?
    Thanks,
    Hussein

  • How to save the output of report program??

    Hello Everbody,
    I want to save the output of a report program(i.e list),how can i do this???which function module should i use to achieve this???
    Thanx in advance.

    <b>data: list like abaplist occurs 0 with header line.
    data: begin of listout occurs 0,   
      line(1024) type c,   
      end of listout.
    do 100 times.
      write:/ sy-index.enddo.
    call function 'SAVE_LIST'
    EXPORTING*
    LIST_INDEX               = '0'
    tables 
      listobject    = list
    exceptions 
    list_index_invalid       = 1  
    others                   = 2          .
    call function 'LIST_TO_ASCI'    
    tables         
    listobject         = list    
    listasci           = listout 
       exceptions      
       empty_list         = 1    
       list_index_invalid = 2    
        others             = 3.
    call function 'GUI_DOWNLOAD' 
       exporting   
          filename = 'C:\Test.txt'  
      tables    
         data_tab = listout.</b>

  • How to call SAP query in a program

    Hi experts
      I have created a query in SQVI its gives a result. Now i want this query to be used in my program. Is there any FM which gets the quary name and populates the result in iternal table. So that i can use that result.
       I know without query you can write using the tables you can fetch the records but i just want to explore a new way to do things. If any body done such type let me know and also give some sample code or process how to achieve it.
    Regards
    Vijay

    Hi Siva
      My final option is that only. That you can do any how. But my intension is to learn something new way. How to do copy the query and where to inject the code is there any example in wiki or artical for that. I want to something new. Old way of creating a report program is possible i want to do this way. If some body could help me out.
    @ karthik
       I have generated the SAP query and i got the program but when i view the code i dont find any select statment or where storing my input data. How to identity that i did in debug mode but am not sure where it pulls the data and where it put in internal table. Can you throw some light with example code or an article.
    Regards
    Vijay

Maybe you are looking for

  • Bootcamp failure, iMac stuck in black screen with cursor line.

    I was in the midst of insalling windows when I ran into a speed bump with my windows install disk and i wanted to start over. So i turned of the iMac from the back power button after stoping the install and wanted to start over again from the os X bo

  • A whine (and veiled query for advice)

    A longish time ago, in a state far away..... I had a license to Photoshop, the bee's knees of creative software. (an even longer time ago, in another universe, I used PageMaker 1.0 on a Mac 512 with internal and extermal floppy drives and no hard dis

  • Getting disabled data

    how can get it?? tried request.getParameter(""); gave me null..... and hit null pointer exception

  • "Edit Distribution" doesn't open a window for edits

    I know that to choose which address to use for someone in your address book who has multiple email addresses, you need to open "Edit Distribution."  (FYI, I'm not in icloud and am not using smart groups.)  When I click on "Edit Distribution" absolute

  • Setting Up Logical Data Source - DBConnection_DAC

    Hi There, In DAC, you have a logical data source define as "DBConnection_DAC" , The same can be used to populate a parameter value in Source System Parameters. Does any know how to set this up of test this "Logical Data Source". Thanks in advance. AJ