Hi guru's what is bapi

hi guru's what is bapi how we use bapi

HI,
BAPI stands for Business API(Application Program Interface).
A BAPI is remotely enabled function module ie it can be invoked from remote programs like standalone JAVA programs, web interface etc..
You can make your function module remotely enabled in attributes of Function module but
A BAPI are standard SAP function modules provided by SAP for remote access. Also they are part of Businees Objest Repository(BOR).
BAPI are RFC enabled function modules. the difference between RFc and BAPI are business objects. You create business objects and those are then registered in your BOR (Business Object Repository) which can be accessed outside the SAP system by using some other applications (Non-SAP) such as VB or JAVA. in this case u only specify the business object and its method from external system in BAPI there is no direct system call. while RFC are direct system call Some BAPIs provide basic functions and can be used for most SAP business object types. These BAPIs should be implemented the same for all business object types. Standardized BAPIs are easier to use and prevent users having to deal with a number of different BAPIs. Whenever possible, a standardized BAPI must be used in preference to an individual BAPI.
The following standardized BAPIs are provided:
Reading instances of SAP business objects
GetList ( ) With the BAPI GetList you can select a range of object key values, for example, company codes and material numbers.
The BAPI GetList() is a class method.
GetDetail() With the BAPI GetDetail() the details of an instance of a business object type are retrieved and returned to the calling program. The instance is identified via its key. The BAPI GetDetail() is an instance method. BAPIs that can create, change or delete instances of a business object type
The following BAPIs of the same object type have to be programmed so that they can be called several times within one transaction. For example, if, after sales order 1 has been created, a second sales order 2 is created in the same transaction, the second BAPI call must not affect the consistency of the sales order 2. After completing the transaction with a COMMIT WORK, both the orders are saved consistently in the database.
Create( ) and CreateFromData! ( )
The BAPIs Create() and CreateFromData() create an instance of an SAP business object type, for example, a purchase order. These BAPIs are class methods.
Change( )
The BAPI Change() changes an existing instance of an SAP business object type, for example, a purchase order. The BAPI Change () is an instance method.
Delete( ) and Undelete( ) The BAPI Delete() deletes an instance of an SAP business object type from the database or sets a deletion flag.
The BAPI Undelete() removes a deletion flag. These BAPIs are instance methods.
Cancel ( ) Unlike the BAPI Delete(), the BAPI Cancel() cancels an instance of a business object type. The instance to be cancelled remains in the database and an additional instance is created and this is the one that is actually canceled. The Cancel() BAPI is an instance method.
Add<subobject> ( ) and Remove<subobject> ( ) The BAPI Add<subobject> adds a subobject to an existing object inst! ance and the BAPI and Remove<subobject> removes a subobject from an object instance. These BAPIs are instance methods.
BAPI-step by step
http://www.sapgenie.com/abap/bapi/example.htm
just refer to the link below
http://www.sapmaterial.com/?gclid=CN322K28t4sCFQ-WbgodSGbK2g
list of all bapis
http://www.planetsap.com/LIST_ALL_BAPIs.htm
for BAPI's
http://www.sappoint.com/abap/bapiintro.pdf
http://www.sappoint.com/abap/bapiprg.pdf
http://www.sappoint.com/abap/bapiactx.pdf
http://www.sappoint.com/abap/bapilst.pdf
http://www.sappoint.com/abap/bapiexer.pdf
http://service.sap.com/ale
http://service.sap.com/bapi
http://help.sap.com/printdocu/core/Print46c/en/data/pdf/BCMIDAPII/CABFAAPIINTRO.pdf
http://help.sap.com/printdocu/core/Print46c/en/data/pdf/CABFABAPIREF/CABFABAPIPG.pdf
http://help.sap.com/printdocu/core/Print46c/en/data/pdf/BCFESDE8/BCFESDE8.pdf
http://www.planetsap.com/Bapi_main_page.htm
http://www.topxml.com/sap/sap_idoc_xml.asp
http://www.sapdevelopment.co.uk/
http://www.sapdevelopment.co.uk/java/jco/bapi_jco.pdf
Also refer to the following links..
www.sap-img.com/bapi.htm
www.sap-img.com/abap/bapi-conventions.htm
www.planetsap.com/Bapi_main_page.htm
www.sapgenie.com/abap/bapi/index.htm
Checkout !!
http://searchsap.techtarget.com/originalContent/0,289142,sid21_gci948835,00.html
http://techrepublic.com.com/5100-6329-1051160.html#
Example Code
we use the function module for creating PO
BAP_PO_CTREAT1.
constants : c_x value 'X'.
data: del_date type sy-datum.
data: pohead type bapimepoheader.
data: poheadx type bapimepoheaderx.
data: exp_head type bapimepoheader.
data: return type table of bapiret2 with header line.
data: poitem type table of bapimepoitem with header line.
data: poitemx type table of bapimepoitemx with header line.
data: posched type table of bapimeposchedule with header line.
data: poschedx type table of bapimeposchedulx with header line.
data: ex_po_number type bapimepoheader-po_number.
parameters: p_matnr type ekpo-matnr.
parameters: p_werks type ekpo-werks.
parameters: p_lgort type ekpo-lgort.
parameters: p_menge type ekpo-menge.
parameters: p_lifnr type ekko-lifnr.
parameters: p_ekorg type ekko-ekorg.
parameters: p_ekgrp type ekko-ekgrp.
parameters: p_bukrs type ekko-bukrs.
Header Level Data
pohead-comp_code = p_bukrs.
pohead-doc_type = 'NB' .
pohead-creat_date = sy-datum .
pohead-vendor = p_lifnr.
pohead-purch_org = p_ekorg.
pohead-pur_group = p_ekgrp.
pohead-langu = sy-langu .
pohead-doc_date = sy-datum.
poheadx-comp_code = c_x.
poheadx-doc_type = c_x.
poheadx-creat_date = c_x.
poheadx-vendor = c_x.
poheadx-langu = c_x.
poheadx-purch_org = c_x.
poheadx-pur_group = c_x.
poheadx-doc_date = c_x.
Item Level Data
poitem-po_item = 1.
poitem-material = p_matnr.
poitem-plant = p_werks.
poitem-stge_loc = p_lgort.
poitem-quantity = p_menge.
append poitem.
poitemx-po_item = 1.
poitemx-po_itemx = c_x.
poitemx-material = c_x.
poitemx-plant = c_x .
poitemx-stge_loc = c_x .
poitemx-quantity = c_x .
poitemx-tax_code = c_x .
poitemx-item_cat = c_x .
poitemx-acctasscat = c_x .
append poitemx.
Schedule Line Level Data
posched-po_item = 1.
posched-sched_line = 1.
posched-del_datcat_ext = 'D'.
del_date = sy-datum + 1.
write del_date to posched-delivery_date.
posched-deliv_time = '000001'.
posched-quantity = p_menge.
append posched.
poschedx-po_item = 1.
poschedx-sched_line = 1.
poschedx-po_itemx = c_x.
poschedx-sched_linex = c_x.
poschedx-del_datcat_ext = c_x.
poschedx-delivery_date = c_x.
poschedx-quantity = c_x.
append poschedx.
call function 'BAPI_PO_CREATE1'
exporting
poheader = pohead
poheaderx = poheadx
testrun = ' '
importing
exppurchaseorder = ex_po_number
expheader = exp_head
tables
return = return
poitem = poitem
poitemx = poitemx
poschedule = posched
poschedulex = poschedx.
call function 'BAPI_TRANSACTION_COMMIT'
exporting
wait = 'X'.
if not ex_po_number is initial.
call function 'DEQUEUE_ALL'.
else.
call function 'DEQUEUE_ALL'.
message i036.
Check this
http://www.sap-img.com/abap/bapi-step-by-step-guidance.htm
http://help.sap.com/saphelp_nw2004s/helpdata/en/7e/5e114a4a1611d1894c0000e829fbbd/frameset.htm
http://www.sapgenie.com/abap/bapi/example.htm
http://help.sap.com/saphelp_46c/helpdata/en/9b/417f07ee2211d1ad14080009b0fb56/frameset.htm
http://searchsap.techtarget.com/originalContent/0,289142,sid21_gci948835,00.html
http://searchsap.techtarget.com/originalContent/0,289142,sid21_gci948835,00.html
http://techrepublic.com.com/5100-6329-1051160.html#
http://www.sap-img.com/bapi.htm
http://www.sap-img.com/abap/bapi-conventions.htm
http://www.sappoint.com/abap/bapiintro.pdf
http://www.sapgenie.com/abap/bapi/example.htm
http://help.sap.com/printdocu/core/Print46c/en/data/pdf/BCMIDAPII/CABFAAPIINTRO.pdf
http://help.sap.com/printdocu/core/Print46c/en/data/pdf/CABFABAPIREF/CABFABAPIPG.pdf
http://help.sap.com/printdocu/core/Print46c/en/data/pdf/BCFESDE8/BCFESDE8.pdf
http://help.sap.com/printdocu/core/Print46c/en/data/pdf/CABFABAPIREF/CABFABAPIPG.pdf
http://help.sap.com/printdocu/core/Print46c/en/data/pdf/BCMIDAPII/CABFAAPIINTRO.pdf
<b>Reward is usefull</b>

Similar Messages

  • Hui guru's what is BAPI comit

    hui guru's what is BAPI comit

    When ever we run a BAPI that is changing the database we should do commit work to write the changes to database.
    Function module "BAPI_TRANSACTION_COMMIT" is a FM which does the commit work.
    When a BAPI is used in transaction called externally to change data in SAP system BAPI_TRANSACTION_COMMIT function should be called to write the changes to the database.
    PATTERN
    CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'
    EXPORTING
    WAIT =
    IMPORTING
    RETURN =
    It has 2 parameters.
    wait = If it is blank then the function commits changes to database but doesnot wait.If wait is set to some value then after commit work the system waits.
    return = It gives messages when commit fails only when wait is set to some value else if wait is blank and commit fails the system crashes without any message.
    If a BAPI is run from a program where it changes the database and a commit work doesnot follow it then the system crashes also it locks certain database elements.

  • What is BAPI and where does it use

    Hi all
    What is BAPI and where does it useful for us. And as a functional consultant how much should i know it.
    regards
    Subrat

    Hi Subrat,
    You can get the information of whatis BAPI in SAP help link below...
    http://help.sap.com/saphelp_46c/helpdata/en/a5/3ec8464ac011d1894e0000e829fbbd/content.htm
    As a Functional consultent, it depends how close you are with the technical part of the implementation. if you are involved in some technical part, you need this information...
    Best Regards,
    Venkat.

  • Prompt please, whether is what either BAPI or FM for deblocking pp-orders

    Hello.
    Prompt please, whether is what either BAPI or FM for deblocking pp-orders (STAT=I0002, it is similar to that, as for example does transaction CO02, COHV).
    Im voraus danke,
    Anton.

    Manish:
    A connection object cannot exist without an address, and has only one, so deletion is not possible.  You can change the address of a CO, or you can mark them for deletion.
    regards,
    bill.

  • Hi guru's what is the difference between table and temlate in smartforms

    hi guru's what is the difference between table and temlate in smartforms

    Hi Vasu,
    Template is used for proper allignment of data which table is used for displaying multiple data.
    We can say Template is for static data and Table is for dynamic data.
    Suppose we have a requirement in which we have to allign the customer address in such a way as shown below:-
    Name- Vasu Company- WIPRO Location- Chennai
    Desig- S/W Native - Mumbai
    Then for proper allighnment we can create a template and split that into 3 columns and 2 rows and create text elements for each cell display a proper allighned data at the output.
    When we include a template inside a loop it gives the same property as a table.
    When we have mutiple data which is to be extended to the next page like when we display all employee details in a company we use table.
    Table has 3 sections , HEADER, ITEM ,FOOTER
    The header secntion will be executed once and it will loop at the item level. at the end footer will be executed.
    Hope this gives u some idea..
    <b>Please reward if useful</b>
    Regards,
    sunil kairam.

  • Hi guru's what is RSEOUT00 in ale idocs plz help me

    hi guru's what is RSEOUT00 in ale idocs plz help me

    Hi,
    Check this link u will find ur answer
    <u>sap.ittoolbox.com/groups/technical-functional/sap-interfaces/idoc-status-remains-at-30-427371</u>
    sap.ittoolbox.com/groups/technical-functional/sap-wf/idoc-process-509096
    www.erpgenie.com/sap/sapedi/operations.htm
    Hope it is answered....
    Regards,
    sana.
    reward if useful....

  • What is BAPI?

    hi Experts,
       What is BAPI?How can i create BAPI?Can u provide me step by step procedure regarding this?
    thanks
    Surya

    BAPI stands for Business Application Programming Interface.
    There are 5 different steps in BAPI.
    - Create BAPI Structure  
    - Create BAPI Function Module or API Method.  
    - Create BAPI object  
    - Release BAPI Function Module.  
    - Release BAPI object.
    Step1. Creating BAPI Structure:  
    - Go to <SE11>. 
    - Select Data Type & Enter a name. 
    - Click on Create.
    - Note: Always BAPI should be in a development class with request number (Not Local Object).
    - Select Structure & hit ENTER.
    - Enter the fields from your database. Make sure that the first field is the Primary Key Field.
    - Then SAVE & ACTIVATE.
    Step 2. Creating BAPI module: 
    - Enter TR.CODE <SE37>.
    - Before entering any thing, from the present screen that you are in, select the menu
       Goto -> Function Groups -> Create Group.
       Enter a name (Note: This name Must start with ZBAPI)
       Let this screen be as it is and open another window and there, enter TR.CODE <SE80).
       Click on the Third ICON that says Inactive Objects. 
       Select the group that you just created and click on Activate. 
       Notice that the group you created will disappear from the list of inactive objects.
    - Go back to <SE37> screen and enter a name and hit <ENTER>. Then enter the group name that you just created and activated.
    NOTE: When you release a function module the respective group will be attached to that particular application. It cannot be used for any other application. NEVER include an already existing group that is attached to another module.
    Now click on the first Tab that says [ATTRIBUTES] and select the radio button that says remote-enabled module since we will be accessing this from any external system.
    Then click on the second tab that says [IMPORT].
    Enter a PARAMETER NAME, TYPE and the structure you created in the first step. Also select the check box ‘Pa’. All remotely enabled functional modules MUST be Pa enabled, where Pa means ‘Passed by Value’ and if you don’t select ‘Pa’, then that means it will be passed by reference..
    Then click on tab that says [EXPORT].
    Enter the following as is in the first three fields 
      RETURN        TYPE        BAPIRETURN (These 3 field values are always same)
      Here also select ‘Pa’ meaning Pass by value.
    Note: BAPIRETURN contains structure with message fields.
    Then SAVE and ACTIVATE.
    Step 3. Creating BAPI object: 
    - Enter Tr.Code <SWO1>   (Note. It is letter ‘O’ and not Zero).
    - Enter a name and then click on create. Enter details. 
    NOTE: Make sure that that Object Type and Program name are SAME.   
    - Enter Application ‘M’, if you are using standard table Mara. If you are using your own database then select ‘Z’ at the bottom. 
    - Then hit <ENTER>. 
    - Now we have to add ‘Methods’. High light METHODS and then select the following from the menu: 
    Goto Utilities -> API Methods -> Add Methods.
    - Enter function Module name and hit <ENTER>.
    - Select the second FORWARD ARROW button (>)to go to next step. 
    - Check if every thing looks ok and again click on FORWARD ARROW button (>).
    - Then select ‘YES’ and click on <SAVE>.
    -  Now on a different screen goto TR.CODE <SE37>.  Enter Function Module name and select from the top menu  Function Module -> Release -> Release.
    - Goback to TR.CODE <SWO1>.
    Here select the menu combination shown below in the same order.
    - Edit -> Change Release Status -> Object Type Component -> To Implemented.
    - Edit -> Change Release Status -> Object Type Component -> To Released.
    - Edit -> Change Release Status -> Object Type -> To Implemented.
    - Edit -> Change Release Status -> Object Type -> To Released.
    - Then click on <SAVE>.
    - Then click on Generate Button (4th button from left hand side looks like spinning wheel).
    - Then Click on the button that says ‘PROGRAM’ to see the source code.
    To check if this is present in work flow goto TR.CODE <BAPI>. 
    Here it shows business object repository.
    - First click on the middle button and then select “ALL” and hit ENTER.
    - Goto tab [ALPHABETICAL] and look for the object that you created. This shows that the BAPI object has been created successfully.

  • What method, BAPI, etc. is used to launch a standard SAP transaction?

    Hello friends,
    Is there a simple way of finding out what method, BAPI, FM, etc. is used  to launch a standard SAP transaction?
    I was told that instead of CALL TRANSACTION using BDCDATA stuff, I can use the method or BAPI or FM, or whatever to get the same results. The problem is I don't know how to find out this information.
    Apparently using BDCDATA for a CALL TRANSACTION form within an ABAP  program can be hazardous because of SAP's upgrades, new releases etc... If one of the screens is modified during the next release, then the BDCDATA will no longer work. So I need to launch a transaction from within my ABAP  without having to worry about future changes implemented by SAP.
    Any ideas?
    Your help is greatly appreciated,

    Hi,
    It depends on which transaction you are looking for. Usually it comes by experience. You can search in SE37 or transaction BAPI to find out relevant BAPI suitable for you. All BAPI FMs starts with name BAPI.
    eg: If you want to findout the BAPI for VA01 transaction, try like this.
    SE37=> enter BAPIsalescreate* and click F4.
    You can see below list of FMs.
    BAPI_SALESDOCU_CREATEFROMDATA
    BAPI_SALESORDER_CREATEFROMDAT1
    BAPI_SALESORDER_CREATEFROMDAT2
    BAPI_SALESORDER_CREATEFROMDATA
    BAPI_SALES_DEL_SCHEDULE_CREATE
    BAPI_SALESORDER_PROXY_CREATE
    BAPI_SALESDOCU_CREATEFROMDATA1
    BAPI_SALESDOCU_CREATEWITHDIA
    By looking at the name we can identify upto 60%. Just go through the FM documentation and see if it works for u and how to use it.
    SCN is always there to help us out. But before posting to ask for a BAPI, please search and give a try to findout:)
    Thanks,
    Vinod.

  • SAP PP-What is BAPI & how it relates with PP-module

    What is BAPI & how it relates with PP-module

    hi
    SAP has introduced object-oriented technology by making SAP processes and data available in the form of SAP business objects.
    External applications can access SAP business objects through standardized, platform-independent interfaces - die Business Application Programming Interfaces (BAPIs). The SAP Business Objects and their BAPIs provide an open, object-oriented view of the business processes and data in an SAP System.
    This guide provides an overview of the SAP business objects, SAP interface types, and their BAPIs as well as the Business Object Repository where business objects and BAPIs are defined and stored.
    go with this link
    http://help.sap.com/saphelp_47x200/helpdata/en/7e/5e114a4a1611d1894c0000e829fbbd/frameset.htm
    -ashok

  • Hi guru's  what is outbound program to run in idocs

    hi guru's  what is outbound program to run in idocs  , plz help me

    Hi Sri,
    If u want to run outbound program for 'Z' segment and Idoc type use this type of  program
    DATA: Begin of imara occurs 0,
    matnr like mara-matnr,
    mtart like mara-mtart,
    mbrsh like mara-mbrsh,
    meins(3) type c,
    end of imara.
    data: begin of imakt occurs 0,
    maktx like makt-maktx,
    end of imakt.
    DATA: wamas_con LIKE edidc,
    imas_data LIKE edidd OCCURS 0 WITH HEADER LINE,
    icom_con LIKE edidc OCCURS 0 WITH HEADER LINE.
    PARAMETERS: e_matnr LIKE mara-matnr,
    e_msgtyp LIKE edidc-mestyp,
    e_rcvprn LIKE edidc-rcvprn.
    retrive app. data from DB
    SELECT matnr mtart mbrsh meins FROM mara INTO TABLE imara WHERE
    matnr = e_matnr.
    SELECT maktx FROM makt INTO TABLE imakt WHERE
    matnr = e_matnr and SPRAS = 'E'.
    *Master idoc control record
    wamas_con-rcvprt = 'LS'.
    wamas_con-rcvprn = e_rcvprn.
    wamas_con-idoctp = 'YMATMAS1'.
    wamas_con-mestyp = e_msgtyp.
    master idoc data records
    LOOP AT imakt.
    imas_data-segnam = 'YMAKT1'.
    move imakt to imas_data-sdata .
    APPEND imas_data.
    ENDLOOP.
    LOOP AT imara.
    imas_data-segnam = 'YMARA1'.
    move imara to imas_data-sdata .
    APPEND imas_data.
    ENDLOOP.
    CALL FUNCTION 'MASTER_IDOC_DISTRIBUTE'
    EXPORTING
    master_idoc_control = wamas_con
    OBJ_TYPE = ''
    CHNUM = ''
    TABLES
    communication_idoc_control = icom_con
    master_idoc_data = imas_data
    EXCEPTIONS
    ERROR_IN_IDOC_CONTROL = 1
    ERROR_WRITING_IDOC_STATUS = 2
    ERROR_IN_IDOC_DATA = 3
    SENDING_LOGICAL_SYSTEM_UNKNOWN = 4
    OTHERS = 5
    IF sy-subrc <> 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
    WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
    ENDIF.
    COMMIT WORK.
    otherwise <b>material master transfer using BD10
                               customer master using BD12
                               vendor master using BD14</b>
    Regards,
    Vijay

  • Hi guru's what are the function modules are used in ALV

    hi guru's what are the function modules are used in ALV

    Hi vasu,
    There are some function modules which will enable to produce the  reports without much effort.
    All the definitions of internal tables, structures and constants are declared in a type-pool called SLIS.
    1. SIMPLE REPORT.
    The important function modules are
    a. Reuse_alv_list_display
    b. Reuse_alv_fieldcatalog_merge
    c. Reuse_alv_events_get
    d. Reuse_alv_commentary_write
    e. Reuse_alv_grid_display
    A. REUSE_ALV_LIST_DISPLAY : This is the function module which prints the data.
    The important parameters are :
    I. Export :
    i. I_callback_program : report id
    ii. I_callback_pf_status_set : routine where a user can set his own pf status or change the functionality of the existing pf status
    iii. I_callback_user_command : routine where the function codes are handled
    iv. I_structure name : name of the dictionary table
    v. Is_layout : structure to set the layout of the report
    vi. It_fieldcat : internal table with the list of all fields and their attributes which are to be printed (this table can be populated automatically by the function module REUSE_ALV_FIELDCATALOG_MERGE
    vii. It_events : internal table with a list of all possible events of ALV and their corresponding form names.
    II. Tables :
    i. t_outtab : internal table with the data to be output
    B. REUSE_ALV_FIELDCATALOG_MERGE : This function module is used to populate a fieldcatalog which is essential to display the data in ALV. If the output data is from a single dictionary table and all the columns are selected, then we need not exclusively create the field catalog. Its enough to mention the table name as a parameter(I_structure name) in the REUSE_ALV_LIST_DISPLAY. But in other cases we need to create it.
    The Important Parameters are :
    I. Export :
    i. I_program_name : report id
    ii. I_internal_tabname : the internal output table
    iii. I_inclname : include or the report name where all the dynamic forms are handled.
    II Changing
    ct_fieldcat : an internal table with the type SLIS_T_FIELDCAT_ALV which is
    declared in the type pool SLIS.
    C. REUSE_ALV_EVENTS_GET : Returns table of possible events for a list type
    Parameters :
    I. Import :
    Et_Events : The event table is returned with all possible CALLBACK events
    for the specified list type (column 'NAME'). For events to be processed by Callback, their 'FORM' field must be filled. If the field is initialized, the event is ignored. The entry can be read from the event table, the field 'FORM' filled and the entry modified using constants from the type pool SALV.
    II. Export :
    I_List_type :
    0 = simple list REUSE_ALV_LIST_DISPLAY
    1 = hierarchcal-sequential list REUSE_ALV_HIERSEQ_LIST_DISPLAY
    2 = simple block list REUSE_ALV_BLOCK_LIST_APPEND
    3 = hierarchical-sequential block list
    REUSE_ALV_BLOCK_LIST_HS_APPEND
    D. REUSE_ALV_COMMENTARY_WRITE : This is used in the Top-of-page event to print the headings and other comments for the list.
    Parameters :
    I. it_list_commentary : internal table with the headings of the type slis_t_listheader.
    This internal table has three fields :
    Typ : ‘H’ – header, ‘S’ – selection , ‘A’ - action
    Key : only when typ is ‘S’.
    Info : the text to be printed
    E. REUSE_ALV_GRID_DISPLAY : A new function in 4.6 version, to display the results in grid rather than as a preview.
    Parameters : same as reuse_alv_list_display
    This is an example for simple list.
    2. BLOCK REPORT
    This is used to have multiple lists continuously.
    The important functions used in this report are:
    A. REUSE_ALV_BLOCK_LIST_INIT
    B. REUSE_ALV_BLOCK_LIST_APPEND
    C. REUSE_ALV_BLOCK_LIST_HS_APPEND
    D. REUSE_ALV_BLOCK_LIST_DISPLAY
    A. REUSE_ALV_BLOCK_LIST_INIT
    Parameters:
    I. I_CALLBACK_PROGRAM
    II. I_CALLBACK_PF_STATUS_SET
    III. I_CALLBACK_USER_COMMAND
    This function module is used to set the default gui status etc.
    B. REUSE_ALV_BLOCK_LIST_APPEND
    Parameters :
    Export :
    I. is_layout : layout settings for block
    II. it_fieldcat : field catalog
    III. i_tabname : internal table name with output data
    IV. it_events : internal table with all possible events
    Tables :
    i. t_outtab : internal table with output data.
    This function module adds the data to the block.
    Repeat this function for all the different blocks to be displayed one after the other.
    C. REUSE_ALV_BLOCK_LIST_HS_APPEND
    This function module is used for hierarchical sequential blocks.
    D. REUSE_ALV_BLOCK_LIST_DISPLAY
    Parameters : All the parameters are optional.
    This function module display the list with data appended by the above function.
    Here the functions REUSE_ALV_FIELDCATALOG_MERGE, REUSE_ALV_EVENTS_GET, REUSE_ALV_COMMENTARY_WRITE can be used.
    3. Hierarchical reports :
    Hierarchical sequential list output.
    The function module is
    A. REUSE_ALV_HIERSEQ_LIST_DISPLAY
    Parameters:
    I. Export:
    i. I_CALLBACK_PROGRAM
    ii. I_CALLBACK_PF_STATUS_SET
    iii. I_CALLBACK_USER_COMMAND
    iv. IS_LAYOUT
    v. IT_FIELDCAT
    vi. IT_EVENTS
    vii. i_tabname_header : Name of the internal table in the program containing the
    output data of the highest hierarchy level.
    viii. i_tabname_item : Name of the internal table in the program containing the
    output data of the lowest hierarchy level.
    ix. is_keyinfo : This structure contains the header and item table field
    names which link the two tables (shared key).
    II. Tables
    i. t_outtab_header : Header table with data to be output
    ii. t_outtab_item : Name of the internal table in the program containing the
    output data of the lowest hierarchy level.
    slis_t_fieldcat_alv : This internal table contains the field attributes. This internal table can be populated automatically by using ‘REUSE_ALV_FIELDCATALOG_MERGE’.
    Important Attributes :
    A. col_pos : position of the column
    B. fieldname : internal fieldname
    C. tabname : internal table name
    D. ref_fieldname : fieldname (dictionary)
    E. ref_tabname : table (dictionary)
    F. key(1) : column with key-color
    G. icon(1) : icon
    H. symbol(1) : symbol
    I. checkbox(1) : checkbox
    J. just(1) : (R)ight (L)eft (C)ent.
    K. do_sum(1) : sum up
    L. no_out(1) : (O)blig.(X)no out
    M. outputlen : output length
    N. seltext_l : long key word
    O. seltext_m : middle key word
    P. seltext_s : short key word
    Q. reptext_ddic : heading (ddic)
    R. ddictxt(1) : (S)hort (M)iddle (L)ong
    S. datatype : datatype
    T. hotspot(1) : hotspot
    some theory regarding alv:
    This table tells ALV which events are processed by the caller by CALLBACK.
    The table of possible events per list type can be initialized using the module REUSE_ALV_EVENTS_GET.
    You can display the names of the constants in the type pools SLIS which represent the individual events using the individual test function in the function module
    REUSE_ALV_EVENT_NAMES_GET. Only events with a form routine name are processed.
    The table structure contains the fields:
    • IT_EVENTS-NAME
    Name of the Callback event.
    Possible Callback events:
    • Action
    USER_COMMAND USING R_UCOMM LIKE SY-UCOMM RS_SELFIELD TYPE SLIS_SELFIELD
    Process actions on the list
    As this is a frequently-used Callback event, the form routine can also be passed directly in the interface in the IMPORTING parameter I_CALLBACK_USER_COMMAND.
    PF_STATUS_SET USING RT_EXTAB TYPE SLIS_T_EXTAB
    If a user list status is to be set, it must be done in the form routine assigned to this event. The ALV function codes, which must not be active, are in the Parameter RT_EXTAB. This table must be passed with the SET PF-STATUS command (with inactive user function codes as well, if necessary).
    The STANDARD status of the function group SALV should be used as a template for a user-specific status.
    As this is a frequently-used Callback event, its form routine can also be passed directly in the interface in the IMPORTING parameter I_CALLBACK_PF_STATUS_SET.
    ITEM_DATA_EXPAND USING RS_SELFIELD TYPE SLIS_SELFIELD RFLG_ALL TYPE C
    Only relevant for hierarchical-sequential lists using the layout parameter IS_LAYOUT-EXPAND_FIELDNAME of the structure IS_LAYOUT.
    Exit for passing item entries (ITEM table) for a header record which was expanded interactively by the user.
    RS_SELFIELD-TABINDEX contains the header table index for which the item entries are to be put in the global item output table (T_OUTTAB_SLAVE). The Callback is only called if ALV has no items for a header which is to be expanded.
    RFLG_ALL is passed with 'X' if the user shows all items. The application must ensure that entries are not repeated in the item table. RS_SELFIELD is initial in this case.
    CALLER_EXIT USING RS_DATA Is called at the beginning of the function module to make special settings. It is not usually used.
    • List processing events
    IMPORTANT: The application Callback routine must not manipulate the internal output table and/or its header record. This restriction applies to all Callbacks which are called in the list output and run under the 'List processing events'.
    TOP_OF_LIST no USING parameter. Information output at the start of the list
    END_OF_LIST no USING parameter. Information output at the end of the list
    TOP_OF_PAGE no USING parameter
    Equivalent to the list processing TOP-OF-PAGE event
    END_OF_PAGE no USING parameter. Not available for hierarchical-sequential lists.
    Information output at the end of a page. This is only called for printing.
    TOP_OF_COVERPAGE no USING parameter
    The selection information and list status are output together (if they exist) on a separate page by default. See also the documentation of the parameters:
    IS_PRINT-NO_COVERPAGE
    IS_PRINT-NO_PRINT_SELINFOS
    IS_PRINT-NO_PRINT_LISTINFOS
    IS_LAYOUT-GET_SELINFOS
    The user can format the header area of the 'cover page' himself or herself by specifying a Callback routine for this event.
    END_OF_COVERPAGE no USING parameter
    Analogously to TOP_OF_COVERPAGE the user can add other information to the information output by ALV (selection information, list status) at this event.
    FOREIGN_TOP_OF_PAGE no USING parameter
    The Top-of-page event is always processed in ALV and is only passed to the caller via the Callback mechanism. This is still the case if the caller, e.g. by a user action, processes a branch list which was not formatted by ALV (e.g. a popup with additional information about the list record selected and displayed by ALV).
    In this case, top-of-page cannot be formatted by ALV analogously to the basic list, it must be handled completely by the caller. The event top-of-page still occurs in ALV. When ALV notices a top-of-page which was not caused by an ALV output, the form routine in FOREIGN_TOP_OF_PAGE is called.
    FOREIGN_END_OF_PAGE no USING parameter
    The event end-of-page is always processed in ALV and only passed to the caller via callback. This is still the case, e.g. when the caller processes a details list which was not formatted by ALV (e.g. a popup with further information about selected list records which were displayed by ALV).
    In this case, end-of-page cannot be formatted by ALV analogously to the basic list, it must be handled completely by the caller. The event end-of-page still occurs in ALV. When ALV notices an end-of-page that was not caused by an ALV output, the form routine in FOREIGN_END_OF_PAGE is called.
    BEFORE_LINE_OUTPUT USING RS_LINEINFO TYPE SLIS_LINEINFO
    Output information before each output line. Should only be used in justified cases because it costs a lot of performance.
    AFTER_LINE_OUTPUT USING RS_LINEINFO TYPE SLIS_LINEINFO
    Output information after each output line. Should only be used in justified cases because it costs a lot of performance.
    • Internal use only
    LIST_MODIFY USING R_TABNAME TYPE SLIS_TABNAME
    R_INDEX LIKE SY-TABIX
    R_INDEX_ITEM LIKE SY-TABIX
    R_INDEX_SUM LIKE SY-TABIX
    • IT_EVENTS-FORM
    Name of the form routine which should be called in the calling program at the event.
    Field_catalog:
    Field catalog with field descriptions
    2.7.1. Description
    Field catalog containing descriptions of the list output fields (usually a subset of the internal output table fields). A field catalog is required for every ALV list output.
    The field catalog for the output table is built-up in the caller's coding. The build-up can be completely or partially automated by calling the REUSE_ALV_FIELDCATALOG_MERGE module
    See also the documentation of the function module REUSE_ALV_FIELDCATALOG_MERGE.
    The minimal field catalog is documented under 'default'. The caller can use the other optional parameters to assign output attributes to a field which differ from the default.
    A field catalog need not be built-up and passed explicitly only under the following conditions:
    • The internal table to be output has the same structure as a Data Dictionary structure which is referred to in the internal table declaration using LIKE or INCLUDE STRUCTURE.
    • all fields in this structure are to be output
    • the structure name is passed to ALV in the parameter I_STRUCTURE_NAME.
    See also the documentation of the IMPORTING paramter I_STRUCTURE_NAME.
    Positioning
    • row_pos (row position)
    value set: 0, 1 - 3
    Only relevant if the list output is to be multi-line (two or three lines) by default.
    A multi-line list can also be defined by the user interactively if the default list is one-line.
    The parameter specifies the relative output line of the column in a multi-line list.
    • col_pos (column position)
    value set: 0, 1 - 60
    only relevant when the default relative column positions differ from the field catalog field sequence. The parameter specifies the relative column position of the field in the list output. The column order can be changed interactively by the user. If this parameter is initial for all field catalog entries, columns appear in the field catalog field sequence.
    Identification
    • fieldname (field name)
    value set: internal output table field name (required parameter)
    Name of the internal output table field which is described by this field catalog entry
    • tabname (internal output table)
    value set: SPACE, internal output table name
    This parameter is used in 'manual' field catalog build-up only for hierarchical-sequential lists.
    Name of the internal output table which contains the field FIELDCAT-FIELDNAME.
    Data Dictionary reference
    • ref_fieldname (reference field name)
    value set: SPACE, Data Dictionary field name
    Name of the Data Dictionary field referred to.
    This parameter is only used when the internal output table field described by the current field catalog entry has a reference to the Data Dictionary (not a program field), and the field name in the internal output table is different from the name of the field in the Data Dictionary. If the field names are identical, naming the Data Dictionary structure or table in the FIELDCAT-REF_TABNAME parameter is sufficient.
    • ref_tabname (reference table/structure field name)
    value set: SPACE, name of a Data Dictionary structure or table
    Structure or table name of the referred Data Dictionary field.
    This parameter is only used when the internal output table field described by the current field catalog entry has a Data Dictionary reference (not a program field).
    Reference to fields with currency/measurement unit
    Each internal output table sum or quantity field whose decimal places are to be formatted appropriately for the unit in the list must follow the convention:
    • the field is of data type QUAN or CURR (internal type P) (the field must really have this physical data type. Overwriting the physical data type with the parameter FIELDCAT-DATATYPE has no effect)
    • There is a field in the internal output table which contains the associated unit.
    • There is also an entry in the field catalog for the unit field.
    (If the unit is not to appear as a column in the list, and cannot be interactively displayed as a column, e.g. because it is always unambiguous and is therefore explicitly output by the caller in the list header, the field catalog units field entry can take the parameter FIELDCAT-TECH = 'X'.
    The association of a value field to a unit affects the output as follows:
    • appropriate decimal places display for the unit
    • an initialized field with a link to a non-initial unit is output as '0' for the unit (if FIELDCAT-NO_ZERO is initial). When this field is summed, this unit affects whether the units are homogeneous.
    • an initialized field with a link to an initial unit is output as SPACE. When this field is summed, the unit SPACE does not affect the homogeneity of the units.
    • When non-initial fields with an initial unit are summed, the unit SPACE is considered to be a unit.
    Link to currency unit
    • cfieldname (currency unit field name)
    value set: SPACE, output table field name
    Only relevant for amount columns with associated unit.
    Name of the internal output table field containing the currency unit associated with the amount field FIELDCAT-FIELDNAME. The field in FIELDCAT-CFIELDNAME must have its own field catalog entry.
    • ctabname (internal currency unit field output table)
    value set: SPACE, output table field name
    only relevant for hierarchical-sequential lists
    Name of the internal output table containing the FIELDCAT-CFIELDNAME field.
    Link to measurement unit
    • qfieldname (measurement unit field name)
    value set: SPACE, output table field name
    only relevant for quantity columns with unit link.
    Name of the internal output table field containing the measurement unit associated with the quantity field FIELDCAT-FIELDNAME.
    The field in FIELDCAT-QFIELDNAME must have its own field catalog entry.
    • qtabname (internal measurement unit field output table)
    value set: SPACE, output table field name
    only relevant for hierarchical-sequential lists
    Name of the internal output table containing the FIELDCAT-QFIELDNAME field.
    Column output options
    • outputlen (column width)
    value set: 0 (initial), n
    For fields with a Data Dictionary link this parameter can be left initial.
    For fields without a Data Dictionary link (program field) the parameter must be given the value of the desired field list output length (column width).
    initial = column width is the output length of the referred Data Dictionary field (domain).
    n = column width is n characters
    • key (key column)
    value set: SPACE, 'X' 'X' = kex field (key field output in color)
    Key fields can not be interactively hidden. Parameter FIELDCAT-NO_OUT must be left initial.
    For exceptions see the documentation of the FIELDCAT-KEY_SEL parameter.
    • key_sel (hideable key column)
    value set: SPACE, 'X'
    only relevant when FIELDCAT-KEY = 'X'
    Key field which can be hidden interactively.
    The key column sequence cannot be changed interactively by the user.
    The output is controlled by the FIELDCAT-NO_OUT parameter analogously to non-key fields.
    • no_out (field in field list)
    value set: SPACE, 'X' 'X' = field is not displayed in the current list.
    The user can interactively choose the field for output from the field list.
    The user can display the contents of these fields at line level using the 'Detail' function.
    See also the 'Detail screen' documentation of the parameter IS_LAYOUT.
    • tech (technical field)
    value set: SPACE, 'X' 'X' = technical field
    Field cannot be output in the list and cannot be displayed interactively.
    Field can only be used in the field catalog (not in IT_SORT, ...).
    • emphasize (highlight columns in color)
    value set: SPACE, 'X' or 'Cxyz' (x:'1'-'9'; y,z: '0'=off '1'=on)
    'X' = column is colored with the default column highlight color.
    'Cxyz' = column is colored with a coded color:
    • C: Color (coding must begin with C)
    • x: color number
    • y: bold
    • z: inverse
    • hotspot (column as hotspot)
    value set: SPACE, 'X'
    'X' = column cells are output as hotspots
    • fix_column (fix column)
    value set: SPACE, 'X'
    Not relevant for block lists (output of several lists consecutively)
    'X' = column fixed (does not scroll horizontally)
    All columns to be fixed must have this flag, starting from the left. If a column without this flag is output, only the columns to the left of this column are fixed. The user can change the column fixing interactively. See also the documentation of the Layout parameter
    IS_LAYOUT-NO_KEYFIX of the IMPORTING paramter IS_LAYOUT.
    • do_sum (sum over column)
    value set: SPACE, 'X' 'X' = a sum is to be calculated over this internal output table field.
    This function can also be called by the user interactively.
    • no_sum (sums forbidden)
    value set: SPACE, 'X' 'X' = no sum can be calculated over this field, although the data type of the field would allow summing.
    • input (column ready for input)
    Function not available
    Format column contents
    • icon
    value set: SPACE, 'X' 'X' = column contents to be output as an icon.
    The caller must consider the printability of icons.
    • symbol
    value set: SPACE, 'X' 'X' = column contents are to be output as a symbol.
    The internal output table column must be a valid symbol character.
    The caller must consider the printability of symbols.
    Symbols can usually be printed, but may not always be output correctly, depending on the printer configuration.
    • just (justification)
    value set: SPACE, 'R', 'L', 'C'
    Only relevant for fields of data type CHAR or NUMC
    ' ' = default justification for this data type
    'R' = right-justified output
    'L' = left-justified output
    'C' = centered output
    The justification of the column header always follows the justification of the columns. Independent justification of the column neader is not possible.
    • lzero (leading zeros)
    value set: SPACE, 'X'
    Only relevant for fields of data type NUMC
    ALV outputs NUMC fields right-justified without leading zeros by default.
    'X' = output with leading zeros
    Note: If a NUMC field is output left-justified or centered by FIELDCAT-JUST, leading zeros are output. If the output of leading zeros is suppressed by a Data Dictionary reference ALPHA conversion exit, the output is always left-justified.
    • no_sign (no +/- sign) Only relevant for value fields
    value set: SPACE, 'X' 'X' = value output without +/ sign
    • no_zero (suppress zeros) Only relevant for value fields
    value set: SPACE, 'X' 'X' = suppress zeros
    • edit_mask (field formatting)
    value set: SPACE, template
    template = see documentation of WRITE formatting option USING EDIT MASK template
    The output conversion conv can be made by template = '== conv'.
    Texts
    The following text parameters should be specified for program fields without a Data Dictionary reference. The texts are taken from the Data Dictionary for fields with a Data Dictionary reference. If this is not desired, the text parameters can also be specified. The Data Dictionary texts are then ignored. If the user changes the column width interactively, the column header text with the appropriate length is always used. The interactive function 'Optimize column width' takes account of both the field contents and the column headers: if all field contents are shorter than the shortest column header, the column width depends on the column header.
    The 'long field label' is also used in display variant definition, sort, etc. popups.
    • seltext_l (long field label)
    • seltext_m (medium field label)
    • seltext_s (short field label)
    • reptext_ddic (header)
    analogous to the Data element maintenance 'Header'
    The specified text is not necessarily output in the list, an optimum among all texts is sought.
    • ddictxt (specify text)
    value set: SPACE, 'L', 'M', 'S'
    You can specify with values 'L', 'M', and 'S', the keyword that should always be used as column header. If the column width changes, no attempt is made in this case to find an appropriate header for the new output width.
    Parameters for program fields without Data Dictionary reference
    see also 'Text' parameters
    • datatype (data type)
    value set: SPACE, Data Dictionary data type (CHAR, NUMC,...)
    Only relevant for fields without Data Dictionary reference
    Program field data type
    • ddic_outputlen (external output length)
    value set: 0 (initial), n
    Only relevant for fields without Data Dictionary reference whose output is nevertheless to be modified by a conversion exit.
    Prerequisites:
    • FIELDCAT-EDIT_MASK = '==conv'
    see also the documentation of the parameter FIELDCAT-EDIT_MASK
    • FIELDCAT-INTLEN = n
    see also the documentation of the parameter FIELDCAT-INTLEN
    n = external format field output length
    The column width FIELDCAT-OUTPUTLEN need not be the same as the external format output length (FIELDCAT-DDIC_OUTPUTLEN).
    • intlen (internal output length)
    value set: 0 (initial), n
    Only relevant for fields without Data Dictionary reference whose output is nevertheless to be modified by a conversion exit.
    Prerequisites:
    • FIELDCAT-EDIT_MASK = '==conv'
    see also the documentation of the parameter FIELDCAT-EDIT_MASK
    • FIELDCAT-DDIC_OUTPUTLEN = n
    see also the documentation of the parameter FIELDCAT-DDIC_OUTPUTLEN
    n = internal format field output length
    • rollname (data element)
    value set: SPACE, Data Dictionary data element name
    F1 help can be provided for a program field without a Data Dictionary reference, or F1 help which differs from the Data Dictionary help can be provided for a field with a Data Dictionary reference, using this parameter.
    When F1 help is called for this field, the documentation of the specified data element is displayed.
    If the FIELDCAT-ROLLNAME is initial for fields with a Data Dictionary reference, the documentation of the data element of the referred Data Dictionary field is output.
    Others
    • sp_group (field group key)
    value set: SPACE, CHAR(1)
    Field group key.
    Keys are assigned to group names in the IT_SPECIAL_GROUPS parameter (see also the documentation of the parameter IT_SPECIAL_GROUPS).
    When such an assignment is made in the field catalog and in IT_SPECIAL_GROUPS, the fields are grouped correspondingly in the display variant popup.
    • reprep (Report/Report interface selection criterion)
    value set: SPACE, 'X'
    Prerequisites:
    • The system contains the Report/Report interface (function group RSTI, table TRSTI)
    • Parameter LAYOUT-REPREP = 'X'
    (see also the documentation of the parameter LAYOUT-REPREP of the IMPORTING parameter IS_LAYOUT )
    'X' = When the Report/Report interface is called, the value of this field is passed in the selected interface start record as a selection criterion.
    2.7.2. Default
    • The following entries are usually sufficient for internal table fields with a reference to a field defined in the Data Dictionary :
    • fieldname
    • ref_tabname
    Notes:
    ALV gets the remaining information from the Data Dictionary.
    If no relative column position (COL_POS) is specified, the fields are output in the list in the order in which they were added to the field catalog.
    REF_FIELDNAME need only be specifid when the name of the internal table field differs from the name of the referred Data Dictionary field.
    Information which is explicitly entered in the field catalog is not overwritten by information from the Data Dictionary.
    Priority rule:
    Entries in the field catalog have priority over differing entries in the Data Dictionary.
    • The following entries are usually sufficient for internal table fields without a reference to the Data Dictionary (program fields):
    • fieldname
    • outputlen
    • datatype
    • seltext_s
    • seltext_m
    • seltext_l
    Notes:
    F1 help can be provided for program fields by assigning a data element to the parameter ROLLNAME.
    If the parameters SELTEXT_S, SELTEXT_M, SELTEXT_L, and REPTEXT_DDIC contain appropriate field labels, the program field column headers are also adjusted appropriately when the column width changes
    sites :
    http://www.sapdevelopment.co.uk/reporting/alv/alv_variousfcat.htm
    <b>plese reward if useful </b>
    Message was edited by:
            sunil kairam

  • Hi guru's what is forign key , and what is foriegn key table

    hi guru's what is forign key , and what is foriegn key table

    hi...
    Foreign key is nothing but simply we can say,
    A field in one table related to field in another table..see the below example...
    consider, there are two tables like emp_personal and emp_official .
    In emp_personal table , the fields are  empid,empname, dob for example. In this table, empid is the primary key field.
    In emp_official table , the fields are empid,dept,designat ion for example. In this also, empid is the Primary key or may not be a Primary key field.
    now we relate these two tables using the foreign key relationship. Foreign key relationship is used to avoid the redundancy mainly...
    now, emp_personal is the Check table( Bcos it holds the empid field, which has the primary key...)
    emp_official table is the Foreign key table (Bcos it holds the empid field, which may or may not be a Primary key).
    now, we foreign key relationship is given. (click the KEY Like  icon in ABAP Dict - Database Table : Emp Official )
    Tables are ready to enter the records...for example create some 5 records in the emp_personal table .
    Table : emp_personal :   Primary Key - empid
    empid     empname    empdob             Status
       1            AAA          1.1.1990          Record saved successfully
       2            BBB          2.2.1990          Record saved successfully
       3            CCC          3.3.1990          Record saved successfully
       4            DDD          4.4.1990          Record saved successfully
       5            EEE          5.5.1990          Record saved successfully
    records are saved in the table : emp_personal.
    now, we are tryiing to create records in emp_official table.
    Table : emp_official :   Primary Key or not a Primary Key - empid
    empid          dept        designation             Status
       1            Dept1        S.E                 Record saved successfully
       2            Dept2       S.SE               Record saved successfully
    now, if u try to create the record which is not in the table emp_personal , which has the empid = 6. but it'll not allow us to create the record 6, bcos of the foreign key relationship between these two tables....
       6            Dept6       P.M                Record doesn't exist......
    now, the foreign key relationship helps us to avoid the duplicate entry......
    Foreign key relationship is possbile between the tables having atleast one same type of field. Also the Technical characteristics of the fields should be same . this is done in the value table.....
    this is the concept of Foreign key...I think this explantion is enough to describe the Foreign key....

  • Hi guru's what is check tabale , what is value table

    hi guru's what is check tabale , what is value table

    The Check Table is the dependent table to which the relationship is defined using foreign keys. The contents of the check table field are shown in the input help for the referenced field.
    For example you have Employee master table & Employee Transaction table.
    When ever an employee Transacts we need to check whether that employee exists , so we can refer to the employee master table.
    This is nothing but a Parent & Child relationship . Here data can be maintained at client level , no development involved.
    As per DBMS what we call foregin key table, is called as check table in SAP.
    The Value table is the table attached to a field at the domain level, where the entry to the field can be only from the value table. They are not used in the Input Help.
    This is maintained at Domain Level.
    When ever you create a domain , you can entered allowed values. For example you go to Domain SHKZG - Debit/credit indicator. Here only allowed values is H or S.
    When ever you use this Domain, the system will forces you to enter only these values.
    This is a sort of master check . To be maintained as a customization object. This mean that if you want to enter values to this table you have to create a development request & transport the same.
    There is 1 more important Difference in Value Table and Check Table is that:
    1. The contents of the check will be used as an input help(F4 Help) for a particular field on which a check table is assigned.
    But the contents of Value Table are never used in Input Help.
    The Heirarchy which decides from where to used the Input Help is:
    1. Input help defined explicitly in ABAP Program or Dialog Module.
    2. Input Help Attached to the referenced Database Table field.
    3. Using the contents of Check Table as an input help if neither (1) or (2) help are there.
    4. Input help from Fixed value or Value range given in Domain.

  • Hi guru's what is RBDMOIND in crossapps

    hi guru's what is RBDMOIND in crossapps help me plz

    Hi,
    RBDMOIND-Status Conversion with Successful tRFC Execution
    This report checks whether IDocs have been sent successfully using tRFC. If they have, the IDoc status is changed from '03 Data transfer to port OK' to '12 Sent OK'.  If the status of one IDoc has not been changed, this indicates that the tRFC for this IDoc has not yet been executed
    On the initial screen:
    If a date is specified in the 'IDoc creation date (from)' field, all IDocs created since this date are checked.
    If the field is left blank, all IDocs in the system with status 03 are checked.
    An entry in the 'IDocs per Commit Work' means that a database commit saving the new status is carried out whenever the number of processed IDocs reaches this value.
    If the status of an IDoc is not changed, this indicates that the aRFC has not been carried out for this IDoc.
    Regards,
    Maha

  • Hi guru's what is the diff between for all entries & joins

    hi guru's what is the diff between for all entries & joins

    Hi Vasu,
    Joins are used to fetch data fast from Database tables:
    Tables are joined with the proper key fields to fetch the data properly.
    If there are no proper key fields between tables don't use Joins;
    Important thing is that don't USE JOINS FOR CLUSTER tableslike BSEG and KONV.
    Only use for Transparenmt tables.
    You can also use joins for the database VIews to fetch the data.
    JOINS
    ... FROM tabref1 [INNER] JOIN tabref2 ON cond
    Effect
    The data is to be selected from transparent database tables and/or views determined by tabref1 and tabref2. tabref1 and tabref2 each have the same form as in variant 1 or are themselves Join expressions. The keyword INNER does not have to be specified. The database tables or views determined by tabref1 and tabref2 must be recognized by the ABAP Dictionary.
    In a relational data structure, it is quite normal for data that belongs together to be split up across several tables to help the process of standardization (see relational databases). To regroup this information into a database query, you can link tables using the join command. This formulates conditions for the columns in the tables involved. The inner join contains all combinations of lines from the database table determined by tabref1 with lines from the table determined by tabref2, whose values together meet the logical condition (join condition) specified using ON>cond.
    Inner join between table 1 and table 2, where column D in both tables in the join condition is set the same:
    Table 1 Table 2
    A
    B
    C
    D
    D
    E
    F
    G
    H
    a1
    b1
    c1
    1
    1
    e1
    f1
    g1
    h1
    a2
    b2
    c2
    1
    3
    e2
    f2
    g2
    h2
    a3
    b3
    c3
    2
    4
    e3
    f3
    g3
    h3
    a4
    b4
    c4
    3
    |--|||--|
    Inner Join
    A
    B
    C
    D
    D
    E
    F
    G
    H
    a1
    b1
    c1
    1
    1
    e1
    f1
    g1
    h1
    a2
    b2
    c2
    1
    1
    e1
    f1
    g1
    h1
    a4
    b4
    c4
    3
    3
    e2
    f2
    g2
    h2
    |--||||||||--|
    Example
    Output a list of all flights from Frankfurt to New York between September 10th and 20th, 2001 that are not sold out:
    DATA: DATE LIKE SFLIGHT-FLDATE,
    CARRID LIKE SFLIGHT-CARRID,
    CONNID LIKE SFLIGHT-CONNID.
    SELECT FCARRID FCONNID F~FLDATE
    INTO (CARRID, CONNID, DATE)
    FROM SFLIGHT AS F INNER JOIN SPFLI AS P
    ON FCARRID = PCARRID AND
    FCONNID = PCONNID
    WHERE P~CITYFROM = 'FRANKFURT'
    AND P~CITYTO = 'NEW YORK'
    AND F~FLDATE BETWEEN '20010910' AND '20010920'
    AND FSEATSOCC < FSEATSMAX.
    WRITE: / DATE, CARRID, CONNID.
    ENDSELECT.
    If there are columns with the same name in both tables, you must distinguish between them by prefixing the field descriptor with the table name or a table alias.
    Note
    In order to determine the result of a SELECT command where the FROM clause contains a join, the database system first creates a temporary table containing the lines that meet the ON condition. The WHERE condition is then applied to the temporary table. It does not matter in an inner join whether the condition is in the ON or WHEREclause. The following example returns the same solution as the previous one.
    Example
    Output of a list of all flights from Frankfurt to New York between September 10th and 20th, 2001 that are not sold out:
    DATA: DATE LIKE SFLIGHT-FLDATE,
    CARRID LIKE SFLIGHT-CARRID,
    CONNID LIKE SFLIGHT-CONNID.
    SELECT FCARRID FCONNID F~FLDATE
    INTO (CARRID, CONNID, DATE)
    FROM SFLIGHT AS F INNER JOIN SPFLI AS P
    ON FCARRID = PCARRID
    WHERE FCONNID = PCONNID
    AND P~CITYFROM = 'FRANKFURT'
    AND P~CITYTO = 'NEW YORK'
    AND F~FLDATE BETWEEN '20010910' AND '20010920'
    AND FSEATSOCC < FSEATSMAX.
    WRITE: / DATE, CARRID, CONNID.
    ENDSELECT.
    Note
    Since not all of the database systems supported by SAP use the standard syntax for ON conditions, the syntax has been restricted. It only allows those joins that produce the same results on all of the supported database systems:
    Only a table or view may appear to the right of the JOIN operator, not another join expression.
    Only AND is possible in the ON condition as a logical operator.
    Each comparison in the ON condition must contain a field from the right-hand table.
    If an outer join occurs in the FROM clause, all the ON conditions must contain at least one "real" JOIN condition (a condition that contains a field from tabref1 amd a field from tabref2.
    Note
    In some cases, '*' may be specified in the SELECT clause, and an internal table or work area is entered into the INTO clause (instead of a list of fields). If so, the fields are written to the target area from left to right in the order in which the tables appear in the FROM clause, according to the structure of each table work area. There can then be gaps between table work areas if you use an Alignment Request. For this reason, you should define the target work area with reference to the types of the database tables, not simply by counting the total number of fields. For an example, see below:
    Variant 3
    ... FROM tabref1 LEFT [OUTER] JOIN tabref2 ON cond
    Effect
    Selects the data from the transparent database tables and/or views specified in tabref1 and tabref2. tabref1 und tabref2 both have either the same form as in variant 1 or are themselves join expressions. The keyword OUTER can be omitted. The database tables or views specified in tabref1 and tabref2 must be recognized by the ABAP-Dictionary.
    In order to determine the result of a SELECT command where the FROM clause contains a left outer join, the database system creates a temporary table containing the lines that meet the ON condition. The remaining fields from the left-hand table (tabref1) are then added to this table, and their corresponding fields from the right-hand table are filled with ZERO values. The system then applies the WHERE condition to the table.
    Left outer join between table 1 and table 2 where column D in both tables set the join condition:
    Table 1 Table 2
    A
    B
    C
    D
    D
    E
    F
    G
    H
    a1
    b1
    c1
    1
    1
    e1
    f1
    g1
    h1
    a2
    b2
    c2
    1
    3
    e2
    f2
    g2
    h2
    a3
    b3
    c3
    2
    4
    e3
    f3
    g3
    h3
    a4
    b4
    c4
    3
    |--|||--|
    Left Outer Join
    A
    B
    C
    D
    D
    E
    F
    G
    H
    a1
    b1
    c1
    1
    1
    e1
    f1
    g1
    h1
    a2
    b2
    c2
    1
    1
    e1
    f1
    g1
    h1
    a3
    b3
    c3
    2
    NULL
    NULL
    NULL
    NULL
    NULL
    a4
    b4
    c4
    3
    3
    e2
    f2
    g2
    h2
    |--||||||||--|
    Example
    Output a list of all custimers with their bookings for October 15th, 2001:
    DATA: CUSTOMER TYPE SCUSTOM,
    BOOKING TYPE SBOOK.
    SELECT SCUSTOMNAME SCUSTOMPOSTCODE SCUSTOM~CITY
    SBOOKFLDATE SBOOKCARRID SBOOKCONNID SBOOKBOOKID
    INTO (CUSTOMER-NAME, CUSTOMER-POSTCODE, CUSTOMER-CITY,
    BOOKING-FLDATE, BOOKING-CARRID, BOOKING-CONNID,
    BOOKING-BOOKID)
    FROM SCUSTOM LEFT OUTER JOIN SBOOK
    ON SCUSTOMID = SBOOKCUSTOMID AND
    SBOOK~FLDATE = '20011015'
    ORDER BY SCUSTOMNAME SBOOKFLDATE.
    WRITE: / CUSTOMER-NAME, CUSTOMER-POSTCODE, CUSTOMER-CITY,
    BOOKING-FLDATE, BOOKING-CARRID, BOOKING-CONNID,
    BOOKING-BOOKID.
    ENDSELECT.
    If there are columns with the same name in both tables, you must distinguish between them by prefixing the field descriptor with the table name or using an alias.
    Note
    For the resulting set of a SELECT command with a left outer join in the FROM clause, it is generally of crucial importance whether a logical condition is in the ON or WHERE condition. Since not all of the database systems supported by SAP themselves support the standard syntax and semantics of the left outer join, the syntax has been restricted to those cases that return the same solution in all database systems:
    Only a table or view may come after the JOIN operator, not another join statement.
    The only logical operator allowed in the ON condition is AND.
    Each comparison in the ON condition must contain a field from the right-hand table.
    Comparisons in the WHERE condition must not contain a field from the right-hand table.
    The ON condition must contain at least one "real" JOIN condition (a condition in which a field from tabref1 as well as from tabref2 occurs).
    Note
    In some cases, '*' may be specivied as the field list in the SELECT clause, and an internal table or work area is entered in the INTO clause (instead of a list of fields). If so, the fields are written to the target area from left to right in the order in which the tables appear in the llen in der FROM clause, according to the structure of each table work area. There can be gaps between the table work areas if you use an Alignment Request. For this reason, you should define the target work area with reference to the types of the database tables, as in the following example (not simply by counting the total number of fields).
    Example
    Example of a JOIN with more than two tables: Select all flights from Frankfurt to New York between September 10th and 20th, 2001 where there are available places, and display the name of the airline.
    DATA: BEGIN OF WA,
    FLIGHT TYPE SFLIGHT,
    PFLI TYPE SPFLI,
    CARR TYPE SCARR,
    END OF WA.
    SELECT * INTO WA
    FROM ( SFLIGHT AS F INNER JOIN SPFLI AS P
    ON FCARRID = PCARRID AND
    FCONNID = PCONNID )
    INNER JOIN SCARR AS C
    ON FCARRID = CCARRID
    WHERE P~CITYFROM = 'FRANKFURT'
    AND P~CITYTO = 'NEW YORK'
    AND F~FLDATE BETWEEN '20010910' AND '20010920'
    AND FSEATSOCC < FSEATSMAX.
    WRITE: / WA-CARR-CARRNAME, WA-FLIGHT-FLDATE, WA-FLIGHT-CARRID,
    WA-FLIGHT-CONNID.
    ENDSELECT.
    And for all entries,
    this will help u.
    use of FOR ALL ENTRIES:
    1. INNER JOIN
    DBTAB1 <----
    > DBTAB2
    It is used to JOIN two DATABASE tables
    having some COMMON fields.
    2. Whereas
    For All Entries,
    DBTAB1 <----
    > ITAB1
    is not at all related to two DATABASE tables.
    It is related to INTERNAL table.
    3. If we want to fetch data
    from some DBTABLE1
    but we want to fetch
    for only some records
    which are contained in some internal table,
    then we use for alll entries.
    1. simple example of for all entries.
    2. NOTE THAT
    In for all entries,
    it is NOT necessary to use TWO DBTABLES.
    (as against JOIN)
    3. use this program (just copy paste)
    it will fetch data
    from T001
    FOR ONLY TWO COMPANIES (as mentioned in itab)
    4
    REPORT abc.
    DATA : BEGIN OF itab OCCURS 0,
    bukrs LIKE t001-bukrs,
    END OF itab.
    DATA : t001 LIKE TABLE OF t001 WITH HEADER LINE.
    itab-bukrs = '1000'.
    APPEND itab.
    itab-bukrs = '1100'.
    APPEND itab.
    SELECT * FROM t001
    INTO TABLE t001
    FOR ALL ENTRIES IN itab
    WHERE bukrs = itab-bukrs.
    LOOP AT t001.
    WRITE :/ t001-bukrs.
    ENDLOOP.
    cheers,
    Hema.

Maybe you are looking for