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,
Rishi
For 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
Similar Messages
-
Link between AUFK and BKPF table
Hi all,
Can anyone tell me the link between AUFK and BKPF table.
Thanks in advance
Regards
Neha Kapoorhi neha ,
1.first u have to get MBLNR from AUFM for that order
2.Next u have to call FM
<b>AC_DOCUMENT_RECORD</b>
I_AWTYP MKPF--->Constant
I_AWREF 4900003215--->MBLNR
I_AWORG 2004--->Year
I_AWSYS
I_AWTYP_INCL
I_AWTYP_EXCL
I_BUKRS
I_VALUTYP 0
X_DIALOG X
then u will get the Accounting Documents.
regards
prabhu -
Extractor for ANIA and/or ANKB
Hello Everyone,
I would like to know if there is any SAP delivered BI Content extractor for table ANIA and/or table ANKB.
I've searched everywhere but with no success.
Does anyone have any idea?
Regards,
Diogo.ANIA has no standard DataSource.
ANIB has no standard DataSource.
I know that currently it is not planned to enhance these standard extraction
functions to integrate simulated WBS element depreciation.
ANKA has no standard DataSource.
ANKB has no standard DataSource.
0FI_AA_005 only takes transactions with entries in ANEK and ANEP.
0FI_AA_006 extracts those transactions which are stored in ANEK, ANEP
and ANEA.
ANLV, ANLK have no standard DataSources.
You will need to create your own generic DataSources, in order to
extract the datas from the tables that have no standard
DataSources.
Colin -
hi friends,
may i get a extractor for Standard cost with material no and variance information
plz help me.Hi ,
Check the below URLs.
Standard datasource for MBEW, MARD & RESB tables
http://help.sap.com/saphelp_nw04/helpdata/en/51/7fe75e107211d48b390000e83234f3/content.htm -
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 -
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 -
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 -
Extractor for RSEG incoming invoice table
Does anyone know if there is a standard extractor that includes incoming invoices from table RSEG? Also is there documentation somewhere on all of the standard extractors?
Dorothy,
I'm looking for the same extractor. Have you found the answer in the meantime?
Thanks,
Sigal. -
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. -
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
Maybe you are looking for
-
I've used My Yahoo for years as my default homepage, bringing together relevant news content, bookmarks etc in one handy place. Since the changes to BT Yahoo, when I sign in, I'm now sent to BT's home page instead by defaultwhich is of no interest t
-
Creating a key for a Time table in HMM format
Hello, I am looking to create an INT column in SQL that inserts all hours and minutes within a day (that is, 1440 entries), in the following format: HMM Where: H is the 24 hours format, without that leading zero, and MM are the minuts with the leadin
-
Photo Duplicate FInder for OS X 10.5.8?
Photo Duplicate FInder for OS X 10.5.8?
-
Different column header row..
How to get a different header row based on the value of an element in a group? For e.g, I have Supplier Group and all the Invoices group under that. Now i want to get the all the invoices group data under one header with an element value in this invo
-
My MacBook Pro won't load my CD with pictures. Help me :(
I bought my laptop a couple months ago so I know it's not because my computer is old, but my picture CD won't load or open or anything. It makes a noise like it's going to start up, but still I get nothing. It works on my parents' desktop computer, b