Suitable BTEs for REGUP and VBPA tables?
Hi Gurus,
What are the suitable BTEs for the REGUP and VBPA?
can we create a new BTE for custom table?
points will be rewarded for the quick responses.
Thanks,
KG
Hi,
Yes we cn create Buisness transaction events for custom table as shown below..
To assign function module to the event, we need to create a product, say ZPRODUCT. Click as shown below:
· Click on New entries.
· Ensure that the Active check box is checked, otherwise BTE wouldnu2019t trigger.
· Now we need to assign the function module created earlier to the event
· Click as per the following screenshot:
· Click on new entries and create the following entry for 00001120:
· Test the BTE by creating a document through FB01 transaction.
· To check whether the assignment field is filled with u201CDemo BTEu201D, display the created accounting document from FB03 and check for the Assignment value.
Double click on the item.
Triggering business object events:
Update the Z function module that is created earlier by calling the function module SWE_EVENT_CREATE to trigger a business object event. Link this event to the workflow.
For more info..follow this link
****************/Tutorials/Workflow/BTE/Demo2.htm
Similar Messages
-
Select query for KONV and VBAK table
hy Experts.
Please Help me For this Query, i got error on it.
I wnt to take KONV-KBETR (RATE FIELD) for particular SO number. and i used following query but it gives error i cant relate VBAK & KONV table.
Please do needful
SELECT KBETR KNUMV FROM KONV INTO (ITAB-KBETR, ITAB-KNUMV) WHERE VBAK-KNUMV = KONV-KNUMV AND VBAK-VBELN IN VBELN.
Thnks
Bhavesh Panchal.Hello Thnks For Reply,
but still i cant take solution. i am making a Sales order Rports. i got all field but i cant fetch filed for RATE and Pending Order Value.
Please check following Code. if need to change u can.
Thnks
Bhavesh Panchal.
REPORT ZTESTCODE.
TYPE-POOLS:slis.
TABLES: VBEP , VBAP , VBPA , VBKD , VBAK , LIKP , LIPS , VBUP , VBBE, KONV, KNA1.
DATA :BEGIN OF itab OCCURS 0,
VBELN LIKE VBAK-VBELN,
POSNR LIKE VBAP-POSNR,
EDATU LIKE VBEP-EDATU,
KNUMV LIKE VBAK-KNUMV,
WMENG LIKE VBEP-WMENG,
BMENG LIKE VBEP-BMENG,
LFIMG LIKE LIPS-LFIMG,
OMENG LIKE VBBE-OMENG,
POSAR LIKE VBAP-POSAR,
NETWR LIKE VBAP-NETWR,
NTGEW LIKE VBAP-NTGEW,
KBETR LIKE KOMV-KBETR,
KUNNR LIKE VBAK-KUNNR,
NAME1 LIKE KNA1-NAME1,
*BRGEW LIKE VBAP-BRGEW,
BSTKD LIKE VBKD-BSTKD,
BSTDK LIKE VBKD-BSTDK,
LFSTA LIKE VBUP-LFSTA,
*KNUMV LIKE VBAK-KNUMV,
*posnr LIKE LIPS-POSNR,
*NETWR LIKE VBAK-NETWR,
BRGEW LIKE VBAP-BRGEW,
LFDAT LIKE LIKP-LFDAT,
*NTGEW LIKE LIKP-NTGEW,
DELIVERY LIKE LIPS-VBELN,
WEIGHT like VBAP-NTGEW,
END OF itab.
*variable for Report ID
DATA: v_repid LIKE sy-repid .
*declaration for fieldcatalog
DATA: i_fieldcat TYPE slis_t_fieldcat_alv,
wa_fieldcat TYPE slis_fieldcat_alv.
DATA: it_listheader TYPE slis_t_listheader.
declartion for layout
DATA: alv_layout TYPE slis_layout_alv.
*Title displayed when the alv list is displayed
*DATA: i_title_main TYPE lvc_title VALUE 'FIRST LIST DISPLAYED'.
DATA: i_title_main TYPE lvc_title VALUE 'Reports : Bhavesh Pacnhal'.
INITIALIZATION.
v_repid = sy-repid.
PERFORM build_fieldcatlog.
SELECTION-SCREEN BEGIN OF BLOCK b1 WITH FRAME TITLE text-001.
SELECT-OPTIONS : VBELN FOR VBAK-VBELN ,
KUNNR FOR VBPA-KUNNR ,
EDATU for ITAB-EDATU.
SELECTION-SCREEN: END OF BLOCK b1.
START-OF-SELECTION.
PERFORM data_retrieval.
PERFORM build_listheader USING it_listheader.
PERFORM display_alv_report.
FORM build_fieldcatlog.
wa_fieldcat-tabname = 'ITAB'.
wa_fieldcat-fieldname = 'VBELN'.
wa_fieldcat-seltext_m = 'SalesOrderNo'.
wa_fieldcat-outputlen = '12'.
APPEND wa_fieldcat TO i_fieldcat.
CLEAR wa_fieldcat.
Field for Customer Name.
wa_fieldcat-tabname = 'ITAB'.
wa_fieldcat-fieldname = 'NAME1'.
wa_fieldcat-seltext_m = 'Customer Name'.
wa_fieldcat-outputlen = '30'.
APPEND wa_fieldcat TO i_fieldcat.
CLEAR wa_fieldcat.
Field For Po Number.
wa_fieldcat-tabname = 'ITAB'.
wa_fieldcat-fieldname = 'BSTKD'.
wa_fieldcat-seltext_m = 'PO No'.
wa_fieldcat-outputlen = '20'.
append wa_fieldcat to i_fieldcat.
clear wa_fieldcat.
Field For Order Value
wa_fieldcat-tabname = 'ITAB'.
wa_fieldcat-fieldname = 'NETWR'.
wa_fieldcat-seltext_m = 'Order Value '.
wa_fieldcat-outputlen = '12'.
APPEND wa_fieldcat TO i_fieldcat.
CLEAR wa_fieldcat.
Field For Po Date.
wa_fieldcat-tabname = 'ITAB'.
wa_fieldcat-fieldname = 'BSTDK'.
wa_fieldcat-seltext_m = 'PO Date'.
wa_fieldcat-outputlen = '20'.
append wa_fieldcat to i_fieldcat.
clear wa_fieldcat.
wa_fieldcat-tabname = 'ITAB'.
wa_fieldcat-fieldname = 'POSNR'.
wa_fieldcat-seltext_m = 'Item No'.
wa_fieldcat-outputlen = '20'.
APPEND wa_fieldcat TO i_fieldcat.
CLEAR wa_fieldcat.
wa_fieldcat-tabname = 'ITAB'.
wa_fieldcat-fieldname = 'EDATU'.
wa_fieldcat-seltext_m = 'Delivery Date'.
wa_fieldcat-outputlen = '12'.
APPEND wa_fieldcat TO i_fieldcat.
CLEAR wa_fieldcat.
wa_fieldcat-tabname = 'VBAP'.
wa_fieldcat-fieldname = 'KWMENG'.
wa_fieldcat-seltext_m = 'Order QTY VABP.'.
wa_fieldcat-outputlen = '14'.
APPEND wa_fieldcat TO i_fieldcat.
CLEAR wa_fieldcat.
Field For Order Qty.
wa_fieldcat-tabname = 'ITAB'.
wa_fieldcat-fieldname = 'WMENG'.
wa_fieldcat-seltext_m = 'Ord.QT.WMEN.'.
wa_fieldcat-outputlen = '20'.
APPEND wa_fieldcat TO i_fieldcat.
CLEAR wa_fieldcat.
Field For Order Qty.
wa_fieldcat-tabname = 'ITAB'.
wa_fieldcat-fieldname = 'BMENG'.
wa_fieldcat-seltext_m = 'Ord.QT.BMEN.'.
wa_fieldcat-outputlen = '20'.
APPEND wa_fieldcat TO i_fieldcat.
CLEAR wa_fieldcat.
field For Delivery Qty.
wa_fieldcat-tabname = 'ITAB'.
wa_fieldcat-fieldname = 'LFMING'.
wa_fieldcat-seltext_m = 'DEL QTY.'.
wa_fieldcat-outputlen = '20'.
APPEND wa_fieldcat TO i_fieldcat.
CLEAR wa_fieldcat.
Field For Open Qty from ITAB.
wa_fieldcat-tabname = 'ITAB'.
wa_fieldcat-fieldname = 'OMENG'.
wa_fieldcat-seltext_m = 'OPEN QTY.'.
wa_fieldcat-outputlen = '20'.
APPEND wa_fieldcat TO i_fieldcat.
CLEAR wa_fieldcat.
Field For Pending Weight from ITAB.
wa_fieldcat-tabname = 'ITAB'.
wa_fieldcat-fieldname = 'BRGEW'.
wa_fieldcat-seltext_m = 'Pending Weight'.
wa_fieldcat-outputlen = '12'.
append wa_fieldcat to i_fieldcat.
clear wa_fieldcat.
Field For netweight.
wa_fieldcat-tabname = 'ITAB'.
wa_fieldcat-fieldname = 'NTGEW'.
wa_fieldcat-seltext_m = 'Net Weight'.
wa_fieldcat-outputlen = '20'.
APPEND wa_fieldcat TO i_fieldcat.
CLEAR wa_fieldcat.
Field For Actual Delivery.
wa_fieldcat-tabname = 'ITAB'.
wa_fieldcat-fieldname = 'LFDAT'.
wa_fieldcat-seltext_m = 'Actual Delivery'.
wa_fieldcat-outputlen = '12'.
append wa_fieldcat to i_fieldcat.
clear wa_fieldcat.
wa_fieldcat-tabname = 'ITAB'.
wa_fieldcat-fieldname = 'KBETR'.
wa_fieldcat-seltext_m = 'RATE'.
wa_fieldcat-outputlen = '20'.
append wa_fieldcat to i_fieldcat.
clear wa_fieldcat.
Field For Actual Delivery.
wa_fieldcat-tabname = 'LIPS'.
wa_fieldcat-fieldname = 'POSNR'.
wa_fieldcat-seltext_m = 'Delivery ITEM'.
wa_fieldcat-outputlen = '20'.
append wa_fieldcat to i_fieldcat.
clear wa_fieldcat.
Field For Pending Value.
VBUP-LFSTA
wa_fieldcat-tabname = 'VBUP'.
wa_fieldcat-fieldname = 'LFSTA'.
wa_fieldcat-seltext_m = 'Pending Value'.
wa_fieldcat-outputlen = '20'.
append wa_fieldcat to i_fieldcat.
clear wa_fieldcat.
Field For pending weight.
wa_fieldcat-tabname = 'ITAB'.
wa_fieldcat-fieldname = 'ITAB-OMENG * KOMV-KBETR'.
wa_fieldcat-seltext_m = 'Pending VALUE'.
wa_fieldcat-outputlen = '20'.
APPEND wa_fieldcat TO i_fieldcat.
CLEAR wa_fieldcat.
ENDFORM. "BUILD_FIELDCATLOG
FORM data_retrieval.
SELECT VBELN NETWR KUNNR FROM VBAK INTO (ITAB-VBELN,ITAB-NETWR,ITAB-KUNNR) WHERE VBELN IN VBELN .
SELECT POSNR POSAR BRGEW FROM VBAP INTO (ITAB-POSNR,ITAB-POSAR,ITAB-BRGEW) WHERE VBELN = ITAB-VBELN .
SELECT EDATU FROM VBEP INTO (ITAB-EDATU) WHERE VBELN = ITAB-VBELN AND POSNR = ITAB-POSNR.
SELECT NAME1 FROM KNA1 INTO (ITAB-NAME1) WHERE KUNNR = ITAB-KUNNR .
SELECT BSTKD BSTDK FROM VBKD INTO (ITAB-BSTKD,ITAB-BSTDK) WHERE VBELN = ITAB-VBELN AND POSNR = ITAB-POSNR.
SELECT VBELN LFIMG FROM LIPS INTO (ITAB-DELIVERY, ITAB-LFIMG) WHERE VGBEL = ITAB-VBELN AND VGPOS = ITAB-POSNR.
SELECT LFDAT NTGEW FROM LIKP INTO (ITAB-LFDAT,ITAB-NTGEW) WHERE VBELN = ITAB-DELIVERY .
SELECT WMENG BMENG FROM VBEP INTO (ITAB-WMENG,ITAB-BMENG) WHERE VBELN IN VBELN .
SELECT SINGLE OMENG FROM VBBE INTO (ITAB-OMENG) WHERE VBELN IN VBELN.
SELECT SINGLE NETWR FROM VBAK INTO (ITAB-NETWR) WHERE VBELN IN VBELN.
SELECT KNUMV FROM VBAK INTO (ITAB-KNUMV) WHERE VBELN IN VBELN.
*SELECT KBETR KNUMV FROM KONV INTO (ITAB-KBETR, ITAB-KNUMV) WHERE KNUMV = VBAK-KNUMV.
*assign VAR1 = itab-kbetr.
*append itab.
*ENDSELECT.
SELECT KBETR KNUMV FROM KONV INTO (ITAB-KBETR, ITAB-KNUMV)WHERE KNUMV = VBAK-KNUMV.
ITAB-KBETR = KONV-KBETR.
ENDSELECT.
APPEND ITAB.
ENDSELECT.
ENDSELECT.
ENDSELECT.
ENDSELECT.
ENDSELECT.
ENDSELECT.
ENDSELECT.
ENDSELECT.
ENDSELECT.
*ENDSELECT.
ENDFORM. "data_retrieval
FORM build_listheader USING it_listheader TYPE slis_t_listheader.
DATA HLINE TYPE SLIS_LISTHEADER.
DATA: ls_line TYPE slis_listheader.
bhavesh
HLINE-INFO = 'report Developed by Bhavesh'.
HLINE-TYP = 'H'.
Header
Bhavesh
CLEAR ls_line.
ls_line-typ = 'H'.
LS_LINE-KEY: not used for this type
ls_line-info = 'Sales ORDER Report'.
APPEND ls_line TO it_listheader.
bhavesh
***Selection
CLEAR ls_line.
ls_line-typ = 'S'.
ls_line-key = 'Key 1'.
ls_line-info = 'SFEL'.
APPEND ls_line TO it_listheader.
ls_line-key = 'Key 2'.
ls_line-info = 'SFEL'.
APPEND ls_line TO it_listheader.
***Action
CLEAR ls_line.
ls_line-typ = 'A'.
LS_LINE-KEY: not used for this type
ls_line-info = 'Status list'.
APPEND ls_line TO it_listheader.
ENDFORM. "BUILD_LISTHEADER
*ENDFORM. "build_listheader
FORM display_alv_report.
v_repid = sy-repid.
CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
EXPORTING
i_callback_program = v_repid
I_CALLBACK_PF_STATUS_SET = 'STATUS'(002)
i_callback_user_command = 'USER_COMMAND'
i_callback_top_of_page = 'TOP_OF_PAGE'
i_grid_title = 'SFEL SALES EXPEDITING REPORT'
i_background_id = 'ALV_BACKGROUND'
I_GRID_SETTINGS =
IS_LAYOUT = LAYO
IS_LAYOUT = ALV_LAYOUT
it_fieldcat = i_fieldcat[]
IT_EXCLUDING =
IT_SPECIAL_GROUPS =
IT_SORT =
IT_FILTER =
IS_SEL_HIDE =
i_default = 'ZLAY1'
I_SAVE = 'A'
is_variant = i_variant
IT_EVENTS = V_EVENTS
TABLES
t_outtab = itab[]
EXCEPTIONS
PROGRAM_ERROR = 1
OTHERS = 2
IF sy-subrc <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
ENDFORM. "display_alv_report
FORM top_of_page.
CALL FUNCTION 'REUSE_ALV_COMMENTARY_WRITE'
EXPORTING
it_list_commentary = it_listheader[].
i_logo = 'ENJOYSAP_LOGO'.
I_END_OF_LIST_GRID =
ENDFORM. "TOP_OF_PAGE -
Export - Import In ABAP ( for variables and internal table)
how can we pass value for the variable and internal table using Export and Import?
data: var type sy-uzeit.
var = sy-uzeit.
EXPORT var TO MEMORY ID 'TIME'.
data: var type sy-uzeit.
IMPORT var FROM MEMORY ID 'TIME'.
write:/ var,sy-subrc,sy-uzeit.
i found var value 0 while importing.
what is the right syntax for passing value of variable and internaltable.
regards,
dushyant.Hi,
There are two possible solutions.
Solution1:
Program1.Should be run before atleast once so that TIME should be filled.
data: var type sy-uzeit.
var = sy-uzeit.
EXPORT var TO MEMORY ID 'TIME'.
Program2.IF the TIME is filled,then only it will produce the result.
data: var type sy-uzeit.
clear var.
IMPORT var FROM MEMORY ID 'TIME'.
write:/ var, sy-subrc, sy-uzeit.
Solution2:
Single program:
data: var type sy-uzeit.
var = sy-uzeit.
EXPORT var TO MEMORY ID 'TIME'.
clear var.
IMPORT var FROM MEMORY ID 'TIME'.
write:/ var, sy-subrc, sy-uzeit.
Kindly reward points by clikcing the star on the left of reply,if it helps. -
Duplicate records in database view for ANLA and ANLC tables
HI all,
Can any one please suggest me how to remove duplicate records from ANLA and ANLC tables when creating a database view.
thanks in advance,
ben.Hi,
Suppose we have two tables one with one field and another with two fields:
TAB1 - Key field KEY1
TAB2 - Key fields KEY1 & Key 2.
No if we create a Database view of these two tables we can do by joining these two tables on Key field KEY1.
Now if in View tab we have inculded TAB1- Key1.
Now lets suppose following four entries are in table TAB1: (AAA), (BBB), (CCC).
and following entries are in table TAB2: (AAA, 1), (AAA, 2), (BBB, 3), (BBB, 5), (DDD, 3).
The data base view will show following entries:
AAA,
AAA,
BBB,
BBB,
Now these entris are duplicate in the output.
This is because TAB2 has multilple entries for same key value of TAB1.
Now if we want to remove multiple entries from ouput - we need to include an entry in selection conditions like TAB2-KEY2 = '1'.
Regards,
Pranav. -
Read data from MDM For Lookup and Flat table using MDM ABAP API
Hi,
I have requriment to read data from MDM from FLAT and Lookup table using MDM ABAP API. My design is like this ,
I have one ITEMS (Main table in MDM) and inside that i have one Lookup flat table ITEM_TYPE , my requriment is to read Item number and its related Item type.
From ABAP.
Please help if any body has any idea.
Regards,
ShyamHI Guys,
I found my solution by myself. Below is the solution , hope this will help others:-
Retrieve data from MDM using MDM ABAP API.
Step- 1. Create structure in SAP with the same name as that of MDM field code for MDM Main table.
Step-2. Create another structure in SAP having all lookup fields of MDM , fieldname in ECC must be same as that of MDM field
code.
Step-3.Create structure in SAP for individual lookup field(Single Field only) with the same name as MDM Field code.
Step-4.
DATA: IT_QUERY TYPE STANDARD TABLE OF MDM_QUERY, "MDM_QUERY_TABLE,
WA_QUERY TYPE MDM_QUERY,
WA_CDT_TEXT TYPE MDM_CDT_TEXT,
IT_RESULT_SET_KEY TYPE MDM_SEARCH_RESULT_TABLE,
WA_RESULT_SET_KEY TYPE MDM_SEARCH_RESULT,
WA_STRING TYPE STRING.
DATA:<Internal table> TYPE STANDARD TABLE OF <SAP Str Having all LOOKup Fields>
DATA: :<Internal table>TYPE STANDARD TABLE OF <SAP Str one LOOKup field>,
<Workarea> LIKE LINE OF :<Internal table>.
*PASS LOGICAL OBJECT NAME.
V_LOG_OBJECT_NAME = 'Logical object name defined in Customization'.
Define logon language, country & region for server
WA_LANGUAGE-LANGUAGE = 'eng'.
WA_LANGUAGE-COUNTRY = 'US'.
WA_LANGUAGE-REGION = 'USA'.
TRY.
CREATE OBJECT LR_API
EXPORTING
IV_LOG_OBJECT_NAME = V_LOG_OBJECT_NAME.
ENDTRY.
CONNECT to repository. Apply particular logon language info
CALL METHOD LR_API->MO_ACCESSOR->CONNECT
EXPORTING
IS_REPOSITORY_LANGUAGE = WA_LANGUAGE.
*NOW PASS ITEM NO AND GET KEY FROM MDM.
CLEAR WA_QUERY.
WA_QUERY-PARAMETER_CODE = <MDM FIELD CODE>. "Field code
WA_QUERY-OPERATOR = 'EQ'. "Contains
WA_QUERY-DIMENSION_TYPE = 1. "Field search
WA_QUERY-CONSTRAINT_TYPE = 8. "Text search
WA_STRING = <Field Value>.
GET REFERENCE OF WA_STRING INTO WA_QUERY-VALUE_LOW.
APPEND WA_QUERY TO IT_QUERY.
CLEAR WA_QUERY.
*PASS ITEM NUMBER AND GET RELATED KEY FROM MDM.
TRY.
CALL METHOD LR_API->MO_CORE_SERVICE->QUERY
EXPORTING
IV_OBJECT_TYPE_CODE = <MDM Main Table>
IT_QUERY = IT_QUERY
IMPORTING
ET_RESULT_SET = IT_RESULT_SET_KEY.
CATCH CX_MDM_COMMUNICATION_FAILURE .
CATCH CX_MDM_KERNEL .
CATCH CX_MDM_NOT_SUPPORTED .
CATCH CX_MDM_USAGE_ERROR .
CATCH CX_MDM_PROVIDER .
CATCH CX_MDM_SERVER_RC_CODE .
ENDTRY.
Pass record id into keys.
LOOP AT IT_RESULT_SET_KEY INTO WA_RESULT_SET_KEY.
WA_KEYS = WA_RESULT_SET_KEY-RECORD_IDS.
ENDLOOP.
WA_RESULT_SET_DEFINITION-FIELD_NAME = <Look field name>.
APPEND WA_RESULT_SET_DEFINITION TO IT_RESULT_SET_DEFINITION.
CALL METHOD LR_API->MO_CORE_SERVICE->RETRIEVE
EXPORTING
IV_OBJECT_TYPE_CODE = <MDM Main Table>
IT_RESULT_SET_DEFINITION = IT_RESULT_SET_DEFINITION
IT_KEYS = WA_KEYS
IMPORTING
ET_RESULT_SET = IT_RESULT_SET.
LOOP AT IT_RESULT_SET INTO
WA_RESULT_SET.
*PASS KEYS INTO MAIN TABLE TO GET Structure for FALT or Look up Table
TRY.
CALL METHOD LR_API->MO_CORE_SERVICE->RETRIEVE_SIMPLE
EXPORTING
IV_OBJECT_TYPE_CODE = <MDM Main Table>
IT_KEYS = WA_KEYS
IMPORTING
ET_DDIC_STRUCTURE =<SAP Strct having all Look up fileds of MDM>
ENDTRY.
LOOP AT <SAP Strct having all Look up fileds of MDM> INTO <Work area>.
CLEAR WA_KEYS.
APPEND <Work area>-field name TO WA_KEYS.
CALL METHOD LR_API->MO_CORE_SERVICE->RETRIEVE_SIMPLE
EXPORTING
IV_OBJECT_TYPE_CODE = <MDM Lookup table name>
IT_KEYS = WA_KEYS
IMPORTING
ET_DDIC_STRUCTURE = <Single Structure in SAP For Lookup field>.
READ TABLE <Single Structure in SAP For Lookup field>. INTO <Work Area> INDEX 1.
Here you can get the value of realted lookup fields associated with main table data.
ENDLOOP.
ENDLOOP.
LR_API->MO_ACCESSOR->DISCONNECT( ).
Edited by: Shyam Babu Sah on Nov 24, 2009 4:52 AM -
BAPI for COSS and COSP Table to Create and Update
Hi,
Is there a BAPI for COSS and COSP for creating and/or updating these tables?
Thankshi ,
u dont have any bapis for updatign specific tables
bapis are generally used for updating a transaction i mean number of tables
where is the use of the tables u can search bapis in transaction bapi
and where are the tables used i guess in fi/co so u can search under them
regards
afzal -
BTE for Publish and Subscribe Interface
CAN anyone tell me BTE tell me an example of Publish and Subscribe Interface?
What is that use for?
How does it get triggred?Business Transaction Events (BTE) allow you to attach additional components, in the form of a function module, for example, to the R/3 system.
Two types of interface are available for this purpose:
Publish & Subscribe interfaces:
These interfaces inform external software that certain events have taken place in an SAP standard application and provide them with the data produced. The external software returns no data to the SAP Standard System.
Process interfaces :
These interfaces are used to control a business process differently than the way in which it is handled in the standard R/3 System. They intervene in the standard process, and return data to the SAP application.
Publish & Subscribe interfaces:
Allow you to start one or more (multiple) additional operations when a particular event is triggered. They do not influence the standard R/3 program in any way.
Multiple operations do not interfere with each other.
Add on components can only import data.
Additional checks (authorizations, existing duplicates, and so on)
The program contains an enhancement in the form of a Business Transaction Event. A function module is called in the SAP program, which determines and processes the active implementations. The names of the event function modules begin with "OPEN_FI_PERFORM_" or "OUTBOUND_CALL_".
The event function module OPEN_FI_PERFORM_<u2026> or OUTBOUND_CALL_<u2026> determines the active implementations for each enhancement and stores them in an internal table. Function modules are implemented in the sequence defined by the internal table. At this point the system also considers the conditions under which the function module will be processed in the customer namespace. For example, a country or an application can be entered as a condition. These conditions are also referred to as filter values.
In case of publish and subscribe interface :
In this case, data only flows in one direction - from the SAP application to the additional component.
SAP application developers make interfaces available to you at certain callup points in a transaction. You can define additional logic at these points.
In a very basic scenario, SAP partners and customers can use the interfaces themselves. In this case business transaction events function in much the same manner as customer exits (see the unit on "Enhancements using Customer Exits").
*Implementing a BTE*
You can use transaction FIBF (called when you selected Use business transaction events from the financial accounting hierarchy) to carry out all necessary activities prior to using a business transaction event.
First, choose an interface to which you would like to attach your function module. The Interface button displays the parameter structure for the interface you have selected. You can also use the documentation to determine what functions each interface allows you to perform.
Use the ABAP Workbench to copy the sample function module sample_interface_<n> to the customer namespace (z_*) of a customer function group. You must not change the interface. You can fill the module with any source text except COMMIT WORK. Do not use a COMMIT WORK! Don't forget to activate the function module.
Create a product in the administration screen.
Assign a number to your function module and product.
In contrast to customer exits, business transaction events are client-specific. This means that the same event can be used in different clients for different purposes.
Business transaction events may also be used more than once -
Best practice for VPD and remote tables
Not specifically an HTMLDB question, but here goes...
HTMLDB 1.6 on 9.2.0.4 connecting over database link (fixed username/password) to 9.2.0.4
I've currently "wrapped" access to the remote tables in views, i.e. view "T" in the HTMLDB parsing schema LOCAL_USER is defined as "SELECT * FROM T@remote"
I'd like to put VPD controls on my backend tables, but I don't get how v('APP_USER') (or even APP_USER put into an application context) would be seen by the remote database.
Should I just put VPD policies on LOCAL_USER's views and call it a day?
Thanks for input!
-JohnIf you implemented the VPD in the remote database, what would your VPD be restricting? All queries would apply the policy based on the DB link fixed username resulting in all users of the HTML DB application having same policy restrictions.
The policy in the remote database does not has access to the value of v('APP_USER'). That value is only available in the database that has HTML DB. You would have to write APIs in the remote database in PL/SQL functions/procedures to pass in the V('APP_USER') value to the remote database. This is doable, but cumbersome.
If you want to have your policy modify your WHERE clause on the fly based on your HTML DB user account, then I would implement the VPD in the database which has your HTML DB repository. I am not sure which of the two scenarios below occur when doing a SELECT * FROM T.
1.) The query goes across the database link, gets all the data out of table T in the remote database, passes back to the HTML DB database, and applies the policy WHERE clause modification in the HTML DB database.
2.) The query applies the policy WHERE clause modification to the view, goes across the database link with the WHERE clause modified, and gets only the data allowed based on the policy from the remote database.
You should test this out to find out for performance purposes what query is actually performed on the remote database.
As always if anyone sees anything inaccurate in what I have written, please correct me.
Mike -
SAP Query error for VBAK and KONV tables
Dear Experts,
Want to create SAP Query for below requirement but faced some error
Step1) Extract the data from VBAK table w.r.t. order type , Sale org and date range
and collected the Sales order numbers and doc. condition record (KNUMV)
Step 2)In table KONV (Transactional condition record data) in this table provided input as doc. condition record (KNUMV) with respect to condition type ABCD
Manually i extracted data, there is no problem .
But customer want to generate SAP Query for above requirement
I tried to create but in t.code SQ02 when i tried to join the table VBAK and KONV i faced the below error
Table KONV cannot be used in a join.
How can I create SAP query for above requirement ???
if its not possible then create Z report is the only solution ??????
Thanks in advanceHello
You can not create Query report with joining KONV. But there is one solution for your problem. You can create Query report by using Database VAV. In this logical database you will find all SD tables and also KONV. Use only those tables and fields which you want in your query report. I have checked this and its working
Please try this and update the forum accordingly.
Edited by: moazzamjii on Jun 30, 2011 12:13 PM -
UITableView: set different background colors for header and the table
I would like to set my background color for my UITableView to white and set my tableViewHeader backgroundColor to grayColor similar to the facebook app. When I bounce scroll my table so that you can see above the header, then currently it is white above the header view. I want that to be brown instead.
In the facebook app, above the headerview, it is a blue color and below the table is a white color. If i try and set the UITableView backgroundColor to brown, then the top will be brown, but so will the bottom. Additionally, all of the unset cells will have a brown background instead of white.
Any help with this?Fixed..
-
Function with for loop and parameter table/column names ... syntax help
I'm trying to create a function that returns the distinct values and counts from a user defined schema/table/column.
The code below defines an object type [stats_on_column_obj] and creates a single table of this type [stats_on_column_tab].
The function is supposed to take three input variables: p_schema_name, p_table_name, p_column_name and return a table (above).
I can hard code a SELECT statement into the () ... but once I try to convert it to parameters & exec immediate I am stuck. The red section is where the issue is (i think).
Oracle 10g.
CREATE TYPE stats_on_column_obj IS OBJECT(
COL_VAL VARCHAR2(500),
COL_VAL_CNT NUMBER (7)
CREATE TYPE stats_on_column_tab IS TABLE OF stats_on_column_obj;
CREATE OR REPLACE FUNCTION get_STATS_ON_COLUMN
p_schema_name IN varchar2,
p_table_name IN varchar2,
p_column_name IN varchar2
RETURN STATS_ON_COLUMN_tab
IS
l_STATS_ON_COLUMN_tab STATS_ON_COLUMN_tab := STATS_ON_COLUMN_tab ();
n INTEGER := 0;
str_select_tbl varchar2(5000);
BEGIN
str_select_tbl := 'SELECT '||p_column_name||' as col_val, count(*) as col_val_cnt FROM '||p_schema_name||'.'||p_table_name||' group by '||p_column_name;
FOR r IN (str_select_tbl)
LOOP
l_STATS_ON_COLUMN_tab.EXTEND;
n := n + 1;
l_STATS_ON_COLUMN_tab (n) := STATS_ON_COLUMN_obj (r.col_val, r.col_val_cnt);
END LOOP ;
RETURN l_STATS_ON_COLUMN_tab;
END;
[Error] PLS-00103 (124: 4): PLS-00103: Encountered the symbol "LOOP" when expecting one of the following: * & - + / at mod remainder rem .. <an exponent (**)> || multiset year DAY_
[Error] PLS-00103 (126: 9): PLS-00103: Encountered the symbol "=" when expecting one of the following: constant exception <an identifier> <a double-quoted delimited-identifier> table LONG_ double ref char time timestam
[Error] PLS-00103 (127: 29): PLS-00103: Encountered the symbol "(" when expecting one of the following: constant exception <an identifier> <a double-quoted delimited-identifier> table LONG_ double ref char time timestam
[Error] PLS-00103 (128: 4): PLS-00103: Encountered the symbol "END" when expecting one of the following: begin function package pragma procedure subtype type use <an identifier> <a double-quoted delimited-identifier> form
SELECT * FROM TABLE (get_STATS_ON_COLUMN('SCHEMAS_X','TABLE_X','COLUMN_X'));SCOTT@orcl > CREATE OR REPLACE
2 FUNCTION get_STATS_ON_COLUMN(
3 p_schema_name IN varchar2,
4 p_table_name IN varchar2,
5 p_column_name IN varchar2
6 )
7 RETURN STATS_ON_COLUMN_tab
8 IS
9 v_STATS_ON_COLUMN_tab STATS_ON_COLUMN_tab := STATS_ON_COLUMN_tab ();
10 v_n INTEGER := 0;
11 v_str_select_tbl VARCHAR2(5000);
12 BEGIN
13 v_str_select_tbl := 'SELECT stats_on_column_obj(' || p_column_name || ',count(*)) FROM ' ||
14 p_schema_name || '.' || p_table_name || ' group by ' || p_column_name;
15 EXECUTE IMMEDIATE v_str_select_tbl
16 BULK COLLECT
17 INTO v_STATS_ON_COLUMN_tab;
18 RETURN v_STATS_ON_COLUMN_tab;
19 END;
20 /
Function created.
SCOTT@orcl > select *
2 from table(
3 get_STATS_ON_COLUMN(
4 'SCOTT',
5 'EMP',
6 'JOB'
7 )
8 )
9 /
COL_VAL COL_VAL_CNT
CLERK 4
SALESMAN 4
PRESIDENT 1
MANAGER 3
ANALYST 2
SCOTT@orcl >
Or better change it to pipelined function.
SY. -
Suitable EJB for operations on two tables
Hi All,
I would like to create a stateless session bean that removes a record from one table and inserts into another table. The method I will be using must be transactional integrity giving me "all or nothing proposition". How can I make sure the failure of the second database operation automatically results in the rollback of the first one.
Thank you.Greetings,
Hi All,
I would like to create a stateless session bean that
removes a record from one table and inserts into
another table. The method I will be using must be
transactional integrity giving me "all or nothing
proposition". How can I make sure the failure of the
second database operation automatically results in the
rollback of the first one.The distributed transaction management of EJBs will take of this for you on the database side of things. What remains is that you code your bean appropriately for the transaction management model (BMT or CMT) of your bean...
First, remember that a Stateless SB cannot carry transaction contexts across multiple client->bean method calls, so your resource operations must occur within the same client method call:
* CMT *
...updateTables()
try {
/* Perform database operations... */
catch( SQLException sqle ) {
try {
context.setRollbackOnly(); // Tell Trans. Mgr. operation failed
catch( IllegalStateException ise ) {
throw new EJBException( "Deployment error!" );
}* BMT *
...updateTables()
UserTransaction ut = null;
try {
ut = context.getUserTransaction();
catch( IllegalStateException ise ) {
throw new EJBException( "Deployment error!" );
try {
ut.begin();
/* Perform database operations... */
ut.commit();
catch( SQLException sqle ) {
try {
ut.rollback();
catch( IllegalStateException ise ) {
throw new EJBException( "Deployment error!" );
catch( <Exception+> e ) { ... }
The last <Exception+> in the above code can be one of:
* NotSupportedException - a consequence of calling ut.begin() and a transaction is already in effect
* RollbackException - if the transaction cannot be commited (another participant called a ROLLBACK)
* IllegalStateException - if a transaction is not in effect when ut.commit() is called
Note: All transaction method calls may also throw a SystemException in case of (um, well...), system errors.
In EJB 2.0 you can also get a HeuristicMixedException from ut.commit() if the trans. mgr. decided a ROLLBACK was necessary.
I hope this helps.
Thank you.Regards,
Tony "Vee Schade" Cook -
Extractor for AUFK and AFKO tables
Hello Experts,
I am looking for a standard extractor for the tables AUFK (Order Master data) and AFKO (Order Header). I wanted to know if there a exists a standard extractor for the same or I have to create a generic one.
Thanks,
RishiFor internal orders (ie aufk) have a look at 0COORDER and the transaction data 0CO_OM_OP*
and the rest of the content for IOs
http://help.sap.com/saphelp_nw70/helpdata/en/f2/db0c3c99d56448e10000000a114084/frameset.htm -
Linkage for RSEG and BSIS tables for tax item
Hi,
How to find corresponding tax line item in BSIS or BSAS table for a RSEG line item.
In case of BSET table I could find the linkage by BSET-TXGRP and RSEG-BUZEI.The obvious link I can see is on bukrs/belnr/buzei/mwskz fields.
All available in all tables. The company code and accounting document number is normally enough but if there are multiple line items use the buzei fields as well. The tax field on is MWSKZ.
Same on both BSIS/BSAS and RSEG.
BSAS is almost the same table as BSIS but has the clearing items as well.
Message was edited by: Barry Neaves -
Partitioning for Fact and Bridge tables
In our data warehouse we have a fact table having 35 million records which keeps monthly snapshot of data. This has been range partitioned on date key for each month end. We have another bridge table having around 50 million records, which is also partitioned the same way. These two tables can be joined on some fields, one of which is date key. When I run a query which uses both of these tables to display data for a month, it uses partitions in fact but does a full scan on bridge table. Partitions of bridge table are not being used at all. This results in very long response time.
Can you suggest me some way to make it work?
ThanksThat's a matter of policy.Does your organisation execute a strict differentiation between ETL developers and DBAs? Then it's probably up to the DBAs to set up the tables, but of course you have to tell them the structures of the tables that they shall create for you.Other organisations allow their ETL developers to create tables "on the fly" in development environments. If this the case for you, then it's up to you. If this is not what you wanted to know, could you please post your question differently so that we can clearly understand what you mean? Regards,Nico
Maybe you are looking for
-
When I use my Apple ID for the last 12 hours I get this response: "There was an error in the App Store. Please try again later. (4)". How do I get around this? Try two apple ID's. Same thing.
-
Domain/lib class path issues
Hello, We are migrating one of our applications from Web Logic 8.1 to 10. The new instance is going to have 2 managed servers, under the web logic domain, hosting the server EAR as well as web WAR respectively. Now the application has certain jars th
-
Is a needed PMU reset a sign of impending failure??
My computer wouldn't start this morning (definitely not a battery issue - tried two fully charged batteries). A PMU reset worked. I haven't had to do a PMU reset before, but I'm wondering if this is a sign of impending failure. What should I be looki
-
List of dependent requirements of planned order for a component
Dear guru , I search a list of dependent requirements of planned order for a component What do you suggest ? Thanks.
-
We have a interface File to file in which we are picking up the file from the ftp server. We have three different files provided. In FCC we are passing the whole data as a single row. We have tried different encoding of the files - UFT-8, UTF-16 and