Data base
Hi all : Issue is data base Please attach see file , copy this file to desktop ,, then run create table vi ,,, as you see its will save the data in access . Please see I took the this example from national instrument example directory C:\Program Files\National Instruments\LabVIEW 8.5\examples\database but I add some objects My problems are : 1- Every one can insert to epos.mdb and do changes 2- I want if I insert same number in column 1 , massage appeared that say this number is in data base , and don't saved it , if this number doesn't exist then application will saved it How can I do that? thanks
Attachments:
database.zip 239 KB
the exemple just cover the creation of a table, but not the insert record.
I do not have the database add on but I am using a database not connected yet to Labview.
To answer your question you should first use create table with the database app(like access: simpler)
next find the function vi to (findRecord(like query) and Numberof record and insert record.
Similar Messages
-
Transfer of xml file elements to data base columns
hi all,
i have to store xml file's data(element values) into the data base(table columns).
i heard that we can acheive this by XSU.
IS it is mediator between xml and db? if yes how to install it.
i tried something as below
with t as (
select xmltype('<Message-Header>
<Message-Id>1234</Message-Id>
<Sender-Company-ID>4569</Sender-Company-ID>
<Sender-Company-Name>abc company</Sender-Company-Nam
<Sender-User-ID>AA</Sender-User-ID>
<Recv-Company-ID>050</Recv-Company-ID>
<Recv-Company-Name>XYZ pvt.ltd</Recv-Company-Name>
<Creation-Time>20101019 15:59:39</Creation-Time>
</Message-Header>') as xml from dual
)but i am getting following error. can anybody explain about this
SQL> ed
Wrote file afiedt.buf
1 with t as (
2 select xmltype('<Message-Header>
3 <Message-Id>1234</Message-Id>
4 <Sender-Company-ID>4569</Sender-Company-ID>
5 <Sender-Company-Name>abc company</Sender-Company-Name>
6 <Sender-User-ID>AA</Sender-User-ID>
7 <Recv-Company-ID>050</Recv-Company-ID>
8 <Recv-Company-Name>XYZ pvt.ltd</Recv-Company-Name>
9 <Creation-Time>20101019 15:59:39</Creation-Time>
10 </Message-Header>') as xml from dual
11* )
SQL> /
with t as (
ERROR at line 1:
ORA-01041: internal error. hostdef extension doesn't existPlease help me..
my db version is Oracle Database 10g Release 10.2.0.1.0 - ProductionHi,
What are you trying to achieve with a single WITH clause and no SELECT?
Please see this from the documentation if you want to use it properly :
http://download.oracle.com/docs/cd/B19306_01/server.102/b14200/statements_10002.htm#i2077142
Apart from its true purpose of subquery factoring, the WITH clause is often use here and there to simulate a table content, but you'll always need a SELECT.
Maybe that's what you were trying to do?
As for your question, starting with release 10.2, Oracle provides XMLTable to shred XML documents into relational structures.
For example,
with t as (
select xmltype('<Message-Header>
<Message-Id>1234</Message-Id>
<Sender-Company-ID>4569</Sender-Company-ID>
<Sender-Company-Name>abc company</Sender-Company-Name>
<Sender-User-ID>AA</Sender-User-ID>
<Recv-Company-ID>050</Recv-Company-ID>
<Recv-Company-Name>XYZ pvt.ltd</Recv-Company-Name>
<Creation-Time>20101019 15:59:39</Creation-Time>
</Message-Header>') as xml from dual
select x.*
from t,
XMLTable(
'/Message-Header'
passing t.xml
columns
message_id number path 'Message-Id',
sender_company_id number path 'Sender-Company-ID',
sender_company_name varchar2(30) path 'Sender-Company-Name',
sender_user_id varchar2(30) path 'Sender-User-ID',
recv_company_id varchar2(30) path 'Recv-Company-ID',
recv_company_name varchar2(30) path 'Recv-Company-Name',
creation_time varchar2(30) path 'Creation-Time'
) x
;If you're working in PL/SQL, and the XML resides in a variable, you can directly do (with necessary datatype conversion in the SELECT) :
insert into your_table ( <your_columns_list> )
select <your_columns_list>
from XMLTable(
'/Message-Header'
passing your_xml_var
columns
message_id number path 'Message-Id',
sender_company_id number path 'Sender-Company-ID',
sender_company_name varchar2(30) path 'Sender-Company-Name',
sender_user_id varchar2(30) path 'Sender-User-ID',
recv_company_id varchar2(30) path 'Recv-Company-ID',
recv_company_name varchar2(30) path 'Recv-Company-Name',
creation_time varchar2(30) path 'Creation-Time'
) x
; -
How to export a data as an XML file from oracle data base?
could u pls tell me the step by step procedure for following questions...? how to export a data as an XML file from oracle data base? is it possible? plz tell me itz urgent requirement...
Thankz in advance
BalaSQL> SELECT * FROM v$version;
BANNER
Oracle DATABASE 11g Enterprise Edition Release 11.1.0.6.0 - Production
PL/SQL Release 11.1.0.6.0 - Production
CORE 11.1.0.6.0 Production
TNS FOR 32-bit Windows: Version 11.1.0.6.0 - Production
NLSRTL Version 11.1.0.6.0 - Production
5 rows selected.
SQL> CREATE OR REPLACE directory utldata AS 'C:\temp';
Directory created.
SQL> declare
2 doc DBMS_XMLDOM.DOMDocument;
3 xdata XMLTYPE;
4
5 CURSOR xmlcur IS
6 SELECT xmlelement("Employee",XMLAttributes('http://www.w3.org/2001/XMLSchema' AS "xmlns:xsi",
7 'http://www.oracle.com/Employee.xsd' AS "xsi:nonamespaceSchemaLocation")
8 ,xmlelement("EmployeeNumber",e.empno)
9 ,xmlelement("EmployeeName",e.ename)
10 ,xmlelement("Department",xmlelement("DepartmentName",d.dname)
11 ,xmlelement("Location",d.loc)
12 )
13 )
14 FROM emp e
15 , dept d
16 WHERE e.DEPTNO=d.DEPTNO;
17
18 begin
19 OPEN xmlcur;
20 FETCH xmlcur INTO xdata;
21 CLOSE xmlcur;
22 doc := DBMS_XMLDOM.NewDOMDocument(xdata);
23 DBMS_XMLDOM.WRITETOFILE(doc, 'UTLDATA/marco.xml');
24 end;
25 /
PL/SQL procedure successfully completed.
. -
Im trying to build user expiration into my registration form, but I cant get the form to send back the date registering.
in my data base i have tried every thing from timestamp to datetime. I can get a timestamp but it is not functioning with the expiration?just have a look at my tutorial Login tables: installation & configuration where the required column attributes are explained and where you can obtain a fully functional SQL dump for a typical ADDT "login" and (optionally) "login_stats" table.
BTW, "expiration" will have to be an "int" column.
Cheers,
Günter -
Quota Generation not happen's on Pro data basis .
Dear experts,
Time evalution status - 1.
1.Employee service 0 - 5 years - 24 Days entitlement
2.Employee service 5 - 10 years - 29 days entitlement.
when generating quota for employee less than five years its calculating correctly.when come's to employee more than 5 years its not calculating on pro-data basis of employee joining month. Instead of Month it's looking at the year and calculating it.
DOJ of employee
Mar-09
Year
TOTAL quota accrued
2009
20
2010
24
2011
24
2012
24
2013
24
Client requirement
System calculation as of now
2014
28
29
Calculation part.
below screen shot show how system calculating and how client needed.
how this scenario can be configured.
Regards
VinodhCheck the Deduction rule for that Quota
once check the Groupings for ESG and PSA
V_001P_ALL
V_503_ALL -
How to stored data after clicking checkbox in data base table
REPORT ZT .
TYPE-pools: slis.
tables:mkpf,mseg,mard,COWB_COMP,ZTABLE.
Types:BEGIN OF tp_data,
mblnr LIKE mseg-mblnr,
matnr LIKE mseg-matnr,
werks LIKE mard-werks,
lgort LIKE mard-lgort,
lgpbe LIKE mard-lgpbe,
charg LIKE mseg-charg,
bwart LIKE mseg-bwart,
budat LIKE mkpf-budat,
menge LIKE mseg-menge,
meins LIKE mseg-meins,
kostl LIKE mseg-kostl,
aufnr LIKE mseg-aufnr,
rsnum LIKE mseg-rsnum,
endkz like COWB_COMP-endkz,
END OF tp_data,
tp_tbl_data TYPE STANDARD TABLE OF tp_data.
MODIFIED*******************
DATA: WA TYPE TP_DATA.
MODIFIED*******************
*data: t_data like Y00_MM_ISSUE_DAT occurs 0 with header line.
Constants
Data objects (variable declarations and definitions)
Report data to be shown.
DATA: it_data TYPE STANDARD TABLE OF tp_data.
MODIFIED*******************
DATA : V_REPID LIKE SY-REPID.
MODIFIED*******************
Heading of the report.
DATA: t_heading TYPE slis_t_listheader.
*========================== Selection Screen
SELECTION-SCREEN BEGIN OF BLOCK b1 WITH FRAME TITLE text-001.
SELECT-OPTIONS:smblnr FOR mseg-mblnr MODIF ID m1,
smatnr FOR mseg-matnr MODIF ID m2,
swerks FOR mard-werks MODIF ID m3,
slgort FOR mard-lgort MODIF ID m4,
slgpbe FOR mard-lgpbe MODIF ID m5,
scharg FOR mseg-charg MODIF ID m6,
sbwart FOR mseg-bwart MODIF ID m7,
skostl FOR mseg-kostl MODIF ID m8,
saufnr FOR mseg-aufnr MODIF ID m9,
srsnum FOR mseg-rsnum MODIF ID m10.
SELECTION-SCREEN END OF BLOCK b1.
SELECTION-SCREEN BEGIN OF BLOCK b2 WITH FRAME TITLE text-002.
PARAMETERS:pre RADIOBUTTON GROUP radi USER-COMMAND ucomm DEFAULT 'X',
pse RADIOBUTTON GROUP radi,
bps RADIOBUTTON GROUP radi.
SELECTION-SCREEN END OF BLOCK b2.
SELECTION-SCREEN BEGIN OF BLOCK b3 WITH FRAME TITLE text-003.
PARAMETER:layout TYPE i.
SELECTION-SCREEN END OF BLOCK b3.
MODIFIED*******************
INITIALIZATION.
V_REPID = sy-repid.
MODIFIED*******************
*=========================== Event Blocks
AT selection-SCREEN.
start-OF-selection.
PERFORM get_data USING it_data.
END-OF-selection.
PERFORM build_alv USING it_data t_heading.
*=========================== Subroutines
*& Form get_data
Gets the information to be shown in the report.
FORM get_data USING t_data TYPE tp_tbl_data.
SELECT msegmblnr msegmatnr mardwerks mardlgort mard~lgpbe
msegcharg msegbwart mkpf~budat
msegmenge msegmeins msegkostl msegaufnr mseg~rsnum
INTO CORRESPONDING FIELDS OF TABLE t_data
FROM mseg
JOIN mard ON mardmatnr EQ msegmatnr
JOIN mkpf ON msegmblnr EQ mkpfmblnr
WHERE mseg~matnr IN smatnr.
ENDFORM. " get_data
*& Form build_alv
Builds and display the ALV Grid.
FORM build_alv USING t_data TYPE tp_tbl_data
t_heading TYPE slis_t_listheader.
ALV required data objects.
DATA: w_title TYPE lvc_title,
w_comm TYPE slis_formname,
w_status TYPE slis_formname,
x_layout TYPE slis_layout_alv,
t_event TYPE slis_t_event,
t_fieldcat TYPE slis_t_fieldcat_alv,
t_sort TYPE slis_t_sortinfo_alv.
REFRESH t_fieldcat.
REFRESH t_event.
REFRESH t_sort.
CLEAR x_layout.
CLEAR w_title.
Field Catalog
PERFORM set_fieldcat2 USING:
1 'MBLNR' 'MBLNR' 'MSEG' space space space space space space
space space space space space space t_fieldcat ,
2 'MATNR' 'MATNR' 'MSEG' space space space space space space
space space space space space space t_fieldcat ,
3 'WERKS' 'WERKS' 'MARD' space space space space space space
space space space space space space t_fieldcat,
4 'LGORT' 'LGORT' 'MARD' space space space space space space
space space space space space space t_fieldcat ,
5 'LGPBE' 'LGPBE' 'MARD' space space space space space space
space space space space space space t_fieldcat ,
6 'CHARG' 'CHARG' 'MSEG' space space space space space space
space space space space space space t_fieldcat ,
7 'BWART' 'BWART' 'MSEG' space space space space space space
space space space space space space t_fieldcat,
8 'BUDAT' 'BUDAT' 'MKPF' space space space space space space
space space space space space space t_fieldcat,
9 'MENGE' 'MENGE' 'MSEG' space space space space space space
space space space space space space t_fieldcat,
10 'MEINS' 'MEINS' 'MSEG' space space space space space space
space space space space space space t_fieldcat,
11 'KOSTL' 'KOSTL' 'MSEG' space space space space space space
space space space space space space t_fieldcat,
12 'AUFNR' 'AUFNR' 'MSEG' space space space space space space
space space space space space space t_fieldcat,
13 'RSNUM' 'RSNUM' 'MSEG' space space space space space space
space space space space space space t_fieldcat,
14 'ENDKZ' 'ENDKZ' 'COWB_COMP' space space 'select' 'Select this row' 'Sel' 'Select this row' space space space 'X' 'X' space t_fieldcat.
Layout
x_layout-zebra = 'X'.
Top of page heading
PERFORM set_top_page_heading USING t_heading t_event.
Events
PERFORM set_events USING t_event.
GUI Status
w_status = ''.
User commands
w_comm = 'USER_COMMAND'.
Order
Example
PERFORM set_order USING '<field>' 'IT_DATA' 'X' space space t_sort.
PERFORM set_order USING 'MBLNR' 'IT_DATA' 'X' space 'X' t_sort.
PERFORM set_order USING 'EBELN' 'IT_DATA' 'X' space 'X' t_sort.
PERFORM set_order USING 'EBELP' 'IT_DATA' 'X' space space t_sort.
Displays the ALV grid
CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
EXPORTING
i_callback_program = V_REPID
it_fieldcat = t_fieldcat
is_layout = x_layout
it_sort = t_sort
i_callback_pf_status_set = w_status
i_callback_user_command = w_comm
i_save = 'X'
it_events = t_event
i_grid_title = w_title
TABLES
t_outtab = t_data
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. " build_alv.
*& Form set_top_page_heading
Creates the report headings.
FORM set_top_page_heading USING t_heading TYPE slis_t_listheader
t_events TYPE slis_t_event.
DATA: x_heading TYPE slis_listheader,
x_event TYPE LINE OF slis_t_event.
Report title
CLEAR t_heading[].
CLEAR x_heading.
x_heading-typ = 'H'.
x_heading-info = 'Reporte Prueba'(001).
APPEND x_heading TO t_heading.
Program name
CLEAR x_heading.
x_heading-typ = 'S'.
x_heading-KEY = 'Program: '.
x_heading-info = sy-repid.
APPEND x_heading TO t_heading.
User who is running the report
CLEAR x_heading.
x_heading-typ = 'S'.
x_heading-KEY = 'User: '.
x_heading-info = sy-uname.
APPEND x_heading TO t_heading.
Date of execution
CLEAR x_heading.
x_heading-typ = 'S'.
x_heading-KEY = 'Date: '.
WRITE sy-datum TO x_heading-info.
APPEND x_heading TO t_heading.
Time of execution
CLEAR x_heading.
x_heading-typ = 'S'.
x_heading-KEY = 'Time: '.
WRITE sy-uzeit TO x_heading-info.
APPEND x_heading TO t_heading.
Top of page event
x_event-name = slis_ev_top_of_page.
x_event-FORM = 'TOP_OF_PAGE'.
APPEND x_event TO t_events.
ENDFORM.
*& Form set_events
Sets the events for ALV.
The TOP_OF_PAGE event is alredy being registered in
the set_top_page_heading subroutine.
FORM set_events USING t_events TYPE slis_t_event.
DATA: x_event TYPE LINE OF slis_t_event.
Example
clear x_event.
x_event-name = .
x_event-form = .
append x_event to t_event.
ENDFORM.
*& Form set_order
Adds an entry to the order table.
FORM set_order USING p_fieldname p_tabname p_up p_down p_subtot
t_sort TYPE slis_t_sortinfo_alv.
DATA: x_sort TYPE slis_sortinfo_alv.
CLEAR x_sort.
x_sort-fieldname = p_fieldname.
x_sort-tabname = p_tabname.
x_sort-UP = p_up.
x_sort-down = p_down.
x_sort-subtot = p_subtot.
APPEND x_sort TO t_sort.
ENDFORM. "set_order
*& Form set_fieldcat2
Adds an entry to the field catalog.
FORM set_fieldcat2 USING p_colpos p_fieldname p_ref_fieldname
p_ref_tabname
p_outputlen p_noout
p_seltext_m p_seltext_l p_seltext_s p_reptext_ddic p_ddictxt
p_hotspot p_showasicon p_checkbox p_edit
p_dosum
t_fieldcat TYPE slis_t_fieldcat_alv.
DATA: wa_fieldcat TYPE slis_fieldcat_alv.
CLEAR wa_fieldcat.
General settings
wa_fieldcat-fieldname = p_fieldname.
wa_fieldcat-col_pos = p_colpos.
wa_fieldcat-no_out = p_noout.
wa_fieldcat-HOTSPOT = p_hotspot.
wa_fieldcat-CHECKBOX = p_checkbox.
wa_fieldcat-ICON = p_showasicon.
wa_fieldcat-do_sum = p_dosum.
Set reference fieldname, tablenam and rollname.
If p_ref_tabname is not given, the ref_fieldname given is a data
*element.
If p_ref_tabname is given, the ref_fieldname given is a field of a
*table. In case ref_fieldname is not given, it is copied from the
*fieldname.
IF p_ref_tabname IS INITIAL.
wa_fieldcat-rollname = p_ref_fieldname.
ELSE.
wa_fieldcat-ref_tabname = p_ref_tabname.
IF p_ref_fieldname EQ space.
wa_fieldcat-ref_fieldname = wa_fieldcat-fieldname.
ELSE.
wa_fieldcat-ref_fieldname = p_ref_fieldname.
ENDIF.
ENDIF.
Set output length.
IF NOT p_outputlen IS INITIAL.
wa_fieldcat-outputlen = p_outputlen.
ENDIF.
Set text headers.
IF NOT p_seltext_m IS INITIAL.
wa_fieldcat-seltext_m = p_seltext_m.
ENDIF.
IF NOT p_seltext_l IS INITIAL.
wa_fieldcat-seltext_l = p_seltext_l.
ENDIF.
IF NOT p_seltext_s IS INITIAL.
wa_fieldcat-seltext_s = p_seltext_s.
ENDIF.
IF NOT p_reptext_ddic IS INITIAL.
wa_fieldcat-reptext_ddic = p_reptext_ddic.
ENDIF.
IF NOT p_ddictxt IS INITIAL.
wa_fieldcat-ddictxt = p_ddictxt.
ENDIF.
Set as editable or not.
IF NOT p_edit IS INITIAL.
wa_fieldcat-INPUT = 'X'.
wa_fieldcat-EDIT = 'X'.
ENDIF.
APPEND wa_fieldcat TO t_fieldcat.
ENDFORM. "set_fieldcat2
*& Form top_of_page
Called on top_of_page ALV event.
Prints the heading.
FORM top_of_page.
CALL FUNCTION 'REUSE_ALV_COMMENTARY_WRITE'
EXPORTING
i_logo = 'TRVPICTURE04'
it_list_commentary = t_heading.
ENDFORM. " alv_top_of_page
*& Form user_command
Called on user_command ALV event.
Executes custom commands.
FORM user_command USING r_ucomm LIKE sy-ucomm
rs_selfield TYPE slis_selfield.
case sy-ucomm.
WHEN '&DATA_SAVE'.
LOOP AT IT_DATA INTO WA WHERE ENDKZ = 'X'.
IF WA-ENDKZ = 'X'.
*******MODIFIED*********************************
U DELETE THIS CODE N USER UR INSERT CODE TO CHECK
SY-MSGV1 = WA-MBLNR. " U CAN DELETE
SY-MSGV2 = WA-MATNR. " U CAN DELETE
MESSAGE ID 'BC_BOR' TYPE 'I' NUMBER '888' " U CAN DELETE
WITH SY-MSGV1 SY-MSGV2. " U CAN DELETE
*******MODIFIED*********************************
INSERT ZTABLE.
ENDIF.
endloop.
ENDCASE.
ENDFORM. "user_command
this is my code, database will stored in fields only.data is empty,
how to slove that one,send any sugestion.Hi Lakshmi,
Can u explain briefly what is ur requirement. U mean to say that after clicking the checkbox in data base table or Screen?
Regards,
Jayaram... -
Differnace b/w SID and Global data base name
please tell me what is differance b/w SID and global data base name.
Hi,
Oracle System Identifier (SID)
A name that identifies a specific instance of a running pre-release 8.1 Oracle database. For any database, there is at least one instance referencing the database.
For pre-release 8.1 databases, SID is used to identify the database. The SID is included in the connect descriptor of a tnsnames.ora file and in the definition of the listener in the listener.ora file.
http://download-uk.oracle.com/docs/cd/B19306_01/network.102/b14213/glossary.htm#i433004
Global database name
The full name of the database which uniquely identifies it from any other database. The global database name is of the form "database_name.database_domain," for example, sales.us.acme.com.
The database name portion, sales, is a simple name you wish to call your database. The database domain portion, us.acme.com, specifies the database domain in which the database is located, making the global database name unique. When possible, Oracle Corporation recommends that your database domain mirror the network domain.
The global database name is the default service name of the database, as specified by the SERVICE_NAMES parameter in the initialization parameter file.
http://download-uk.oracle.com/docs/cd/B19306_01/network.102/b14213/glossary.htm#i435858
Adith -
i have been using CView Manager 11 to do my reports and is relatively easy to setup reports to the data base, but not all of my reports work with this program plus there is no user manual available. So I am trying to switch over to Chrystal Reports 11 with little success. I can not figure out how to setup the data base server with this program. I am trying to access the McKesson IntelliShelf Supply (Supply Scan) data base server. Is there anyone that can help me with this?
McKesson is an OEM partner of ours. I suggest you ask them how to.
-
Creating a Crystal Report from a non-SAP data base
I have the following scenario
server1\myDataBase
server1\SAP\sapDataBases
in sapDataBases I have about 30 company databases. I am trying to create a report, that gets informatino from a table/view/SP from server1\myDataBase, when I try to PREVIEW or SAVE such report on SAP Business One, I always get errors as
I understand that this eerror means taht I can't invoke the data from out of SAP; it needs to be inside SAP (at least the SP, incoking some other data bases and stuff..)
Some bodies have told me that it is beacuase I can only create a report from a table/view/sp that resides in the running/currently SAP company database. Is this right?
Also, If this is the case, this means that If I have an SP taht I use for a crystal report, and 30 companies, I have to create such SP in the 30 companies?
This is my software details:
SQL Server 2012
SAP Business One 9 PL 11
SAP BusinessObjects Crystal Reports 2013 Support Pack 2 version 14.1.2.1121
What I want to do is to create a non-SAP data base to create all the SPs/Views for reports, to centralize it, and the just create one reporte and do the 30-imports in each company database, without the need of creating such sps/views in each company-database. Is this possible?
ThanksMoved to Integration Kit forum.
The people in this forum will know more about the data structure than the CR Design forum which typically doesn't know much about the SAP Data sources Structure.
Don -
Creating a Single Report from Oracle Data Base and BI Answers
Hi,
I wanted to create a single report by using a BI Report where in we have project and Activity columns,now I want to add column with Program to see the results.Program data is in Oracle Database.
Can some one help me how to create the report.
ii.How to edit a pivot table in BI word designer.What I am doing present is creating every time a new report.
Thx In Adv.
From SravanHi Pivot table was a general question.Is is nothing to do with the qus 1.
See I have a report which have a programme and Activity.So I need to get the data of Prject from Data base how to do this in BIP.....I am not using any pivot table here. -
How to stored data after clicking check box save in data base table
TABLES:mseg,mard,mkpf.
TYPE-POOLS:slis.
SELECTION-SCREEN BEGIN OF BLOCK b1 WITH FRAME TITLE text-001.
SELECT-OPTIONS:smblnr FOR mseg-mblnr MODIF ID m1,
smatnr FOR mseg-matnr MODIF ID m2,
swerks FOR mard-werks MODIF ID m3,
slgort FOR mard-lgort MODIF ID m4,
slgpbe FOR mard-lgpbe MODIF ID m5,
scharg FOR mseg-charg MODIF ID m6,
sbwart FOR mseg-bwart MODIF ID m7,
skostl FOR mseg-kostl MODIF ID m8,
saufnr FOR mseg-aufnr MODIF ID m9,
srsnum FOR mseg-rsnum MODIF ID m10.
SELECTION-SCREEN END OF BLOCK b1.
SELECTION-SCREEN BEGIN OF BLOCK b2 WITH FRAME TITLE text-002.
PARAMETERS:pre RADIOBUTTON GROUP radi USER-COMMAND ucomm DEFAULT 'X',
pse RADIOBUTTON GROUP radi,
bps RADIOBUTTON GROUP radi.
SELECTION-SCREEN END OF BLOCK b2.
SELECTION-SCREEN BEGIN OF BLOCK b3 WITH FRAME TITLE text-003.
PARAMETER:layout TYPE i.
SELECTION-SCREEN END OF BLOCK b3.
DATA:BEGIN OF itab OCCURS 0,
mblnr LIKE mseg-mblnr,
matnr LIKE mseg-matnr,
werks LIKE mard-werks,
lgort LIKE mard-lgort,
lgpbe LIKE mard-lgpbe,
charg LIKE mseg-charg,
bwart LIKE mseg-bwart,
budat LIKE mkpf-budat,
menge LIKE mseg-menge,
meins LIKE mseg-meins,
kostl LIKE mseg-kostl,
aufnr LIKE mseg-aufnr,
rsnum LIKE mseg-rsnum,
checkbox TYPE c,
END OF itab.
DATA: gt_fieldcat TYPE slis_t_fieldcat_alv,
gw_fieldcat TYPE slis_fieldcat_alv,
gt_layout TYPE slis_layout_alv.
START-OF-SELECTION.
SELECT msegmblnr msegmatnr mardwerks mardlgort mardlgpbe msegcharg msegbwart mkpfbudat
msegmenge msegmeins msegkostl msegaufnr mseg~rsnum
INTO TABLE itab FROM
mseg JOIN mard ON mardmatnr EQ msegmatnr
JOIN mkpf ON msegmblnr EQ mkpfmblnr
WHERE mseg~matnr IN smatnr.
IF sy-subrc EQ 0.
SORT itab BY matnr.
PERFORM display_alv_output.
ENDIF.
*& Form display_alv_output
text
--> p1 text
<-- p2 text
FORM display_alv_output.
REFRESH gt_fieldcat.
gw_fieldcat-fieldname = 'MBLNR'.
gw_fieldcat-tabname = 'itab'.
gw_fieldcat-col_pos = 1.
gw_fieldcat-seltext_m = 'material document'.
gw_fieldcat-key = 'x'.
APPEND gw_fieldcat TO gt_fieldcat.
CLEAR gw_fieldcat.
gw_fieldcat-fieldname = 'MATNR'.
gw_fieldcat-tabname = 'itab'.
gw_fieldcat-col_pos = 2.
gw_fieldcat-seltext_m = 'material'.
gw_fieldcat-key = ' '.
APPEND gw_fieldcat TO gt_fieldcat.
CLEAR gw_fieldcat.
gw_fieldcat-fieldname = 'WERKS'.
gw_fieldcat-tabname = 'itab'.
gw_fieldcat-col_pos = 3.
gw_fieldcat-seltext_m = 'plant'.
gw_fieldcat-key = ' '.
APPEND gw_fieldcat TO gt_fieldcat.
CLEAR gw_fieldcat.
gw_fieldcat-fieldname = 'LGORT'.
gw_fieldcat-tabname = 'itab'.
gw_fieldcat-col_pos = 4.
gw_fieldcat-seltext_m = 'storage location'.
gw_fieldcat-key = ' '.
APPEND gw_fieldcat TO gt_fieldcat.
CLEAR gw_fieldcat.
gw_fieldcat-fieldname = 'LGPBE'.
gw_fieldcat-tabname = 'itab'.
gw_fieldcat-col_pos = 5.
gw_fieldcat-seltext_m = 'storage bin'.
gw_fieldcat-key = ' '.
APPEND gw_fieldcat TO gt_fieldcat.
CLEAR gw_fieldcat.
gw_fieldcat-fieldname = 'CHARG'.
gw_fieldcat-tabname = 'itab'.
gw_fieldcat-col_pos = 6.
gw_fieldcat-seltext_m = 'Batch number'.
gw_fieldcat-key = ' '.
APPEND gw_fieldcat TO gt_fieldcat.
CLEAR gw_fieldcat.
gw_fieldcat-fieldname = 'BWART'.
gw_fieldcat-tabname = 'itab'.
gw_fieldcat-col_pos = 7.
gw_fieldcat-seltext_m = 'Movement Type (Inventory Management)'.
gw_fieldcat-key = ' '.
APPEND gw_fieldcat TO gt_fieldcat.
CLEAR gw_fieldcat.
gw_fieldcat-fieldname = 'BUDAT'.
gw_fieldcat-tabname = 'itab'.
gw_fieldcat-col_pos = 8.
gw_fieldcat-seltext_m = 'Posting Date in the Document'.
gw_fieldcat-key = ' '.
APPEND gw_fieldcat TO gt_fieldcat.
CLEAR gw_fieldcat.
gw_fieldcat-fieldname = 'MENGE'.
gw_fieldcat-tabname = 'itab'.
gw_fieldcat-col_pos = 9.
gw_fieldcat-seltext_m = 'QUANTITY'.
gw_fieldcat-key = ' '.
APPEND gw_fieldcat TO gt_fieldcat.
CLEAR gw_fieldcat.
gw_fieldcat-fieldname = 'MEINS'.
gw_fieldcat-tabname = 'itab'.
gw_fieldcat-col_pos = 10.
gw_fieldcat-seltext_m = 'Basic unit of measure'.
gw_fieldcat-key = ' '.
APPEND gw_fieldcat TO gt_fieldcat.
CLEAR gw_fieldcat.
gw_fieldcat-fieldname = 'KOSTL'.
gw_fieldcat-tabname = 'itab'.
gw_fieldcat-col_pos = 11.
gw_fieldcat-seltext_m = 'Cost center'.
gw_fieldcat-key = ' '.
APPEND gw_fieldcat TO gt_fieldcat.
CLEAR gw_fieldcat.
gw_fieldcat-fieldname = 'AUFNR'.
gw_fieldcat-tabname = 'itab'.
gw_fieldcat-col_pos = 12.
gw_fieldcat-seltext_m = 'Order Number'.
gw_fieldcat-key = ' '.
APPEND gw_fieldcat TO gt_fieldcat.
CLEAR gw_fieldcat.
gw_fieldcat-fieldname = 'RSNUM'.
gw_fieldcat-tabname = 'itab'.
gw_fieldcat-col_pos = 13.
gw_fieldcat-seltext_m = 'Number of Reservation / Depe'.
gw_fieldcat-key = ' '.
APPEND gw_fieldcat TO gt_fieldcat.
CLEAR gw_fieldcat.
gw_fieldcat-col_pos = 14.
gw_fieldcat-fieldname = 'CHECKBOX'.
gw_fieldcat-seltext_m = 'Compltd'.
gw_fieldcat-checkbox = 'X'.
gw_fieldcat-edit = 'X'.
APPEND gw_fieldcat TO gt_fieldcat.
CLEAR gw_fieldcat.
CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
EXPORTING
I_CALLBACK_PROGRAM = 'ZREPORT'
IS_LAYOUT = gt_layout
IT_FIELDCAT = gt_fieldcat
TABLES
t_outtab = itab
EXCEPTIONS
PROGRAM_ERROR = 1
OTHERS = 2.
ENDFORM. " display_alv_output
this is mycode .
send me replay.Hi Lakshmi,
Can u explain briefly what is ur requirement. U mean to say that after clicking the checkbox in data base table or Screen?
Regards,
Jayaram... -
Logical data base for license revenue report.
Hi All,
My requirement is to create "license revenue report through SAP Query with following fields:
VBAK:
Sales Document,Sales Doc type,net value of sales order in document,sales org,distribution channel,division,sales office,business area,customer purchase order number,customer purchase order date,sold to party.
VBAP:
Sales document item,target quantity in sales units,target quantity in UOM,usage indicator,billing block for item,business area,plant(own or external),
origin of bill of material,net price,SD document currency,material pricing pgroup,account assignment group for this material,activity type,personnel number.
VEDA:
contracts start date,contract end date,date on which contract is assigned.,installation date,agreement acceptance date
VBREVK:
clearing account for accrued revenues,clearing accountkey(offsetting account),total accrued value,currency key,amount in document currency,posting year and posting period.
VBREVE:
revenue amount,currency key,accrual period,company code,country of destination,profit center,posting year and posting period,amount in document currency,gl account,account for deferred revenue,account for non billed receivable
Is there any standard logical data base which gives all the required fields mentioned above? since i am not SD consultant i am not sure whether i have to take only above tables exactly or not
there are certain logical databases like SD_ORDER,SD_SALES_DOCUMENT which has tables VBAK,VBAP,VEDA but i am unable to join remaining tables VBREVE and VBREVK with those logical data bases
Please provide some valuable suggestions on this.
Thanks&RegardsHi All,
My requirement is to create "license revenue report through SAP Query with following fields:
VBAK:
Sales Document,Sales Doc type,net value of sales order in document,sales org,distribution channel,division,sales office,business area,customer purchase order number,customer purchase order date,sold to party.
VBAP:
Sales document item,target quantity in sales units,target quantity in UOM,usage indicator,billing block for item,business area,plant(own or external),
origin of bill of material,net price,SD document currency,material pricing pgroup,account assignment group for this material,activity type,personnel number.
VEDA:
contracts start date,contract end date,date on which contract is assigned.,installation date,agreement acceptance date
VBREVK:
clearing account for accrued revenues,clearing accountkey(offsetting account),total accrued value,currency key,amount in document currency,posting year and posting period.
VBREVE:
revenue amount,currency key,accrual period,company code,country of destination,profit center,posting year and posting period,amount in document currency,gl account,account for deferred revenue,account for non billed receivable
Is there any standard logical data base which gives all the required fields mentioned above? since i am not SD consultant i am not sure whether i have to take only above tables exactly or not
there are certain logical databases like SD_ORDER,SD_SALES_DOCUMENT which has tables VBAK,VBAP,VEDA but i am unable to join remaining tables VBREVE and VBREVK with those logical data bases
Please provide some valuable suggestions on this.
Thanks&Regards -
How to develop a report based on multiple data bases in BIP
Hi,
I have to develop a report based on multiple database(Sources). My queries is having multiple data base tables. How to achieve this in BIP
Regards,
MalliHi ,
After creating the dataset under datamodel save your data sets.
Click on Datamodel , on the right side window you will have the Main data set option , click on the drop down option and select Concatenated sql option.
Check the below links you will get a good idea.
http://www.rittmanmead.com/2008/04/bi-publisher-reports-with-multiple-data-sources/
http://docs.oracle.com/cd/E12096_01/books/PubUser/T421739T423025.htm
If the Post is useful to you award the points :)
Thanks,
Ananth v -
How can I insert images in data base?
Hi!!
I don't know what i need to do.
My problem is that I need to save images in the data base but I don't know how. The images are from autopart catalogues.
Thanks for your helpHi,
Here is the example which uses dbms_lob utility to insert an image into the database.
Create a table to store the blobs:
create table blobs
( id varchar2(255),
blob_col blob
Step 2.
Create a logical directory in the database to the physical file system:
create or replace directory MY_FILES as 'c:\images';
Step 3.
Create a procedure to load the blobs from the file system using the logical
directory. The gif "aria.gif" must exist in c:\images.
create or replace procedure insert_img as
f_lob bfile;
b_lob blob;
begin
insert into blobs values ( 'MyGif', empty_blob() )
return blob_col into b_lob;
f_lob := bfilename( 'MY_FILES', 'aria.gif' );
dbms_lob.fileopen(f_lob, dbms_lob.file_readonly);
dbms_lob.loadfromfile( b_lob, f_lob, dbms_lob.getlength(f_lob) );
dbms_lob.fileclose(f_lob);
commit;
end;
Regards
Anand
null -
How can i read data in DCS data base
I have logged current and voltage in dcs data base. I want to read that voltage with respect to time and plot in voltage Vs current graph. but i have a ploblem to read that data in dcs libary. can any one help me please.
Thanks & Regard
Nitin JainI can't claim to know much about visual C# Net, but I do know a bit about pagemaker. It really can't handle equations. there are a few work arounds involving things like baseline shifts and multiple text boxes, but generally equations were created in different programs and placed in pagemaker in picture or eps files. Either way the chances of extracting usable data out of pagemaker is very slim.
Jay -
can we with ligthroom have the sofware set up on multiples computer mac and mc and share the same dat base library?
No, a Lightroom catalog cannot be on a networked drive, and can only be accessed by a single user at a time.
Maybe you are looking for
-
Trying to login to the App Store and it keeps asking me to answer security questions but when I try to do so the page just goes blank to white and then disappear . By this point I am already successfully logged in. Please help.
-
Getting error: Report Application Server failed
I started posting my problem in thread below and have been advised to continue in this forum Reference thread: The Report Application Server failed My problem occurs in a asp application (vb 2005) and also when I run the Crystal Report stand alone (x
-
Safari Home Page On Secure Wifi Network Login
My employer has a very secure guest network. Sometimes when I log in and connect, my Ipad goes directly to Apple.com. This causes a problem because if I hit the Home key so I can open Safari, my Ipad disconnects from the WiFi network and I get a "not
-
Importing older Digital Signatures into an Electronic Document Mgmt System
I have Adobe PDF documents signed with digital signatures in 2002-03 that I need to import into an EMC Documentum repository without invalidating the signatures. When I try pulling documents into the system, they are seen as "changed or modified" by
-
ClassCastException while PortableRemoteObject.narrow
Hello, I am getting the ClassCastException when I am narrowing the looked up home object. Here is the exception: java.lang.ClassCastException at com.sun.corba.se.internal.javax.rmi.PortableRemoteObject.narrow(PortableRemoteObject.java:293)