Data base block in non DB Enviorment
dear all ,
i have 3 blocks in my application , where only one of it is a database table block and in this block the data is entered from other table ( eg on a button press the data is compiled from 2 diff tables and copied into its RECORD ) . now the problem is on saving the from (commit) the form is not saving any thing in this table . the block property is set to database='YES'
this is very urgent . thanks in advance
rgds
dg
Do you get any error message from Forms? (see also shift+F1 function when running your fmx).
Marco
Similar Messages
-
Hi All,
I need simple query which i found difficult to solve please guide.
I have one database block in which five database field
1. item1
2. item2
3. item3
4. item4
5. item5
in which i just replace data from i field to another is such a way that each field contain two button
1. copy
2. paste
when i select item1 then copy paste button enable and when i press copy button then item1 field data copy when when i select item5 button will enable and when i press button paste then data of item1 field data copy to item5 field and item5 field data copy to item1 field (simply replace of data), now the problem is when i copy of item1 data and paste to item5 its working fine but i unable to replace data item5 to item1 how can i do this.
ThanksDECLARE
TEMP varchar2 ( 15 ) ;
BEGIN
TEMP := :ITEM7 ;
:ITEM7 :=:ITEM5 ;
:ITEM5 :=TEMP;
END;
this is not as simple as u define
actually i have told u i have no. of item field and we don't no which field i came if i use variable then ok but next how to this variable use can assign as replacement
I AM USING COPY BUTTON TRIGGER
BEGIN
go_item('item1');
:v_value :=:system.current_value;
:v_curr_field :=:system.current_item;
END;
I AM USING PASTE BUTTON TRIGGER
DECLARE
BEGIN
:ITEM1:=:V_VALUE;
END; -
Best Practice for SAP PI installation to share Data Base server with other
Hi All,
We are going for PI three tire installation but now I need some best practice document for PI installation should share Data base with other Non-SAP Application or not. I never see SAP PI install on Data base server which has other Application sharing. I do not know what is best practice but I am sure sharing data base server with other non-sap application doesnu2019t look good means not clean architecture, so I need some SAP document for best practice to get it approve from management. If somebody has any document link please let me know.
With regards
SunilYou should not mix different apps into one database.
If you have a standard database license provided by SAP, then this is not allowed. See these sap notes for details:
[581312 - Oracle database: licensing restrictions|https://service.sap.com/sap/bc/bsp/spn/sapnotes/index2.htm?numm=581312]
[105047 - Support for Oracle functions in the SAP environment|https://service.sap.com/sap/bc/bsp/spn/sapnotes/index2.htm?numm=105047] -> number 23
23. External data in the SAP database
Must be covered by an acquired database license (Note 581312).
Permitted for administration tools and monitoring tools.
In addition, we do not recommend to use an SAP database with non-SAP software, since this constellation has considerable disadvantages
Regards, Michael -
Hello guys, i need your help, so whats going on is that i have builded a database trigger and it fires "before update".When im testing that trigger and try to update a certain field (in my case,the end_date) , the data base blocks and..it does nothing.
I put here an excert of the trigger
CREATE OR REPLACE TRIGGER APPS.JE_UBS_TAX_BANK_ACCOUNT_TRG
BEFORE UPDATE
OF START_DATE
,END_DATE
ON AP.AP_BANK_ACCOUNT_USES_ALL
REFERENCING NEW AS NEW OLD AS OLD
FOR EACH ROW
DECLARE
tmpvar NUMBER;
n_org_id ubs.je_ubs_tax_pay_method.org_id%type :=null;
-- Declaração das variáveis de JE_UBS_TAX_PAY_METHOD
n_start_date ubs.je_ubs_tax_pay_method.start_date%type :=null;
n_end_date ubs.je_ubs_tax_pay_method.end_date%type :=null;
-- Cursor À JE_UBS_TAX_PAY_METHOD
cursor c_pay_methods is
SELECT start_date, end_date
FROM ubs.je_ubs_tax_pay_method
WHERE bank_account_id = :NEW.external_bank_account_id
AND org_id = n_org_id;
-- Declaração de Excepcoes
-- exception_general exception; -- Excepcao
BEGIN
apps.je_ubs_all_debug_api.insert_log ('Inicio do trigger' || SQLERRM, ' JE_UBS_TAX_BANK_ACCOUNT_TRG');
n_org_id := apps.fnd_profile.VALUE ('ORG_ID');
open c_pay_methods;
fetch c_pay_methods into n_start_date,
n_end_date;
loop
IF UPDATING (:old.end_date)
THEN
IF (n_end_date > :new.end_date)
THEN
BEGIN
UPDATE ubs.je_ubs_tax_pay_method
SET end_date = :NEW.end_date
WHERE bank_account_id = :new.external_bank_account_id
AND org_id = n_org_id;
EXCEPTION
WHEN OTHERS
THEN
apps.je_ubs_all_debug_api.insert_log ('Error at Update end_date of je_ubs_tax_pay_method' || SQLERRM, ' JE_UBS_TAX_BANK_ACCOUNT_TRG');
RAISE;
apps.je_ubs_all_debug_api.insert_log ('Updated end_date at je_ubs_tax_pay_method ' || SQLERRM, ' JE_UBS_TAX_BANK_ACCOUNT_TRG');
END;
END IF;
END IF;
I think the problem must be insuficient privilegies but im not sure. I saved the trigger at the "apps" schema,the trigger table is at the "ap" schema, and the cursor table is at another schema, the "ubs"
I didn´t saved the trigger at the same schema as the trigger table ("AP"), because i did not have priviliges.
Help me if you can.eheh ! no guys, i just posted a little of the trigger. but ill post everything:
CREATE OR REPLACE TRIGGER APPS.JE_UBS_TAX_BANK_ACCOUNT_TRG
BEFORE UPDATE
OF START_DATE
,END_DATE
ON AP.AP_BANK_ACCOUNT_USES_ALL
REFERENCING NEW AS NEW OLD AS OLD
FOR EACH ROW
DECLARE
NAME: JE_UBS_TAX_BANK_ACCOUNT_TRG
PURPOSE:
REVISIONS:
Ver Date Author Description
1.0 18-08-2008 José Fernandes 1. Created this trigger.
tmpvar NUMBER;
n_org_id ubs.je_ubs_tax_pay_method.org_id%type :=null;
-- Declaração das variáveis de JE_UBS_TAX_PAY_METHOD
n_start_date ubs.je_ubs_tax_pay_method.start_date%type :=null;
n_end_date ubs.je_ubs_tax_pay_method.end_date%type :=null;
-- Cursor À JE_UBS_TAX_PAY_METHOD
cursor c_pay_methods is
SELECT start_date, end_date
FROM ubs.je_ubs_tax_pay_method
WHERE bank_account_id = :NEW.external_bank_account_id
AND org_id = n_org_id;
-- Declaração de Excepcoes
-- exception_general exception; -- Excepcao
BEGIN
apps.je_ubs_all_debug_api.insert_log ('Inicio do trigger' || SQLERRM, ' JE_UBS_TAX_BANK_ACCOUNT_TRG');
n_org_id := apps.fnd_profile.VALUE ('ORG_ID');
open c_pay_methods;
fetch c_pay_methods into n_start_date,
n_end_date;
loop
IF UPDATING (:old.end_date)
THEN
IF (n_end_date > :new.end_date)
THEN
BEGIN
UPDATE ubs.je_ubs_tax_pay_method
SET end_date = :NEW.end_date
WHERE bank_account_id = :new.external_bank_account_id
AND org_id = n_org_id;
EXCEPTION
WHEN OTHERS
THEN
apps.je_ubs_all_debug_api.insert_log ('Error at Update end_date of je_ubs_tax_pay_method' || SQLERRM, ' JE_UBS_TAX_BANK_ACCOUNT_TRG');
RAISE;
apps.je_ubs_all_debug_api.insert_log ('Updated end_date at je_ubs_tax_pay_method ' || SQLERRM, ' JE_UBS_TAX_BANK_ACCOUNT_TRG');
END;
END IF;
END IF;
IF UPDATING (:old.start_date)
THEN
IF (n_start_date < :new.start_date)
THEN
BEGIN
UPDATE ubs.je_ubs_tax_pay_method
SET start_date = :new.start_date
WHERE bank_account_id = :new.external_bank_account_id
AND org_id = n_org_id;
EXCEPTION
WHEN OTHERS
THEN
apps.je_ubs_all_debug_api.insert_log ('Error at Update start_date of je_ubs_tax_pay_method ' || SQLERRM, ' JE_UBS_TAX_BANK_ACCOUNT_TRG');
RAISE;
apps.je_ubs_all_debug_api.insert_log ('Updated start_date of je_ubs_tax_pay_method ' || SQLERRM, ' JE_UBS_TAX_BANK_ACCOUNT_TRG');
END;
END IF;
END IF;
end loop;
apps.je_ubs_all_debug_api.insert_log ('Success - End of trigger ' || SQLERRM, ' JE_UBS_TAX_BANK_ACCOUNT_TRG');
EXCEPTION
WHEN OTHERS
THEN
apps.je_ubs_all_debug_api.insert_log ('Exception - When Others ' || SQLERRM, ' JE_UBS_TAX_BANK_ACCOUNT_TRG');
RAISE;
END je_ubs_tax_bank_account_trg;
*************************************************** -
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 -
How to display records into a non table base block..
Hi,
Can anybody help me how to display records into a non table base block....
Find below is my coding but it only display the last record in the first line
in the block.
PROCEDURE CREATE_CARTON_QUESTION IS
CURSOR car_c IS
select /*+ rule */ question_id, question_description
from WHOP.QADB_QUESTIONS
where question_category = 'Carton'
and question_active_flag = 'Y';
v_found VARCHAR2(10);
v_status boolean;
v_error varchar2(150);
v_count number;
car_r car_c%rowtype;
begin
begin
select count(*) into v_count
from WHOP.QADB_QUESTIONS
where question_category = 'Carton'
and question_active_flag = 'Y';
exception
when no_data_found then
v_count := 0;
end;
if v_count > 0 then
for car_r in car_c loop
---populating carton questions
:la_carton.carton_question_id := car_r.question_id;
:la_carton.carton_question_answer := 'N';
:la_carton.carton_error_details := null;
:la_carton.attribute2 := car_r.question_description;
end loop;
end if;
end;
Thanks in advance.
Regards,
JunHi SNatapov,
Thanks for you reply but still I get this error...
FRM-40737 Illegal restricted procedure GO_BLOCK in WHEN-VALIDATE-ITEM trigger.
Please note that I call that program unit in the last field of my control block inside when-validate-item trigger the questions should be display in la_carton block which is my non-base table block.
Find below is the code....
begin
go_block('la_carton');
first_record;
for car_r in car_c loop
---populating carton questions
:la_carton.carton_question_id := car_r.question_id;
:la_carton.carton_question_answer := 'N';
:la_carton.carton_error_details := null;
:la_carton.attribute2 := car_r.question_description;
next_record;
end loop;
end;
Hoping you can help me this problem...
Thanks in advance.
Regards,
Jun -
Access non-Oracle data base from Oracle Data base?
Hi,
I have a system using Oracle data base but i have to query some data in
Access data base called TA_2008.mdb for specific table called FPTrans
My oracle database SID=Ahmed10g my schema is attend/attend.
I have tried to use the Heterogenous Services Generic Connectivity Agents .
I think i have to build the ODBC driver for Access database not for oracle and specify the Access DB name
But i built the driver for oracle.
Please clear the steps for me and correct me if i am wrong .......................
1. Create ODBC driver [microsoft ODBC for Oracle] as File Data Source Name =attendoraclefds
user : attend
password : attend
Server :ahmed10g
2. create intilization Parameter file in the path D:\oracle10gDB\product\10.2.0\db_1\hs\admin
called : initATTENDORACLEFDS.ora
CONTAINS PARAMETERS:
HS_FDS_CONNECT_INFO=FILEDSN=attendoraclefds
HS_FDS_TRACE_LEVEL=ON
3. Edit TNSname.ora file :
attendoraclefds =
(DESCRIPTION =
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = TCP)(HOST = awahaishi_lptp.sepocye.com)(PORT = 1521))
(CONNECT_DATA =
(SERVICE_NAME = attendoraclefds)
(HS = OK)
4. Edit Listener.ora file :
SID_LIST_LISTENER =
(SID_LIST =
(SID_DESC =
(PROGRAM = extproc)
(SID_NAME = PLSExtProc)
(ORACLE_HOME = D:\oracle10gDB\product\10.2.0\db_1)
(SID_DESC =
(PROGRAM = hsodbc)
(SID_NAME = attendoraclefds)
(ORACLE_HOME = D:\oracle10gDB\product\10.2.0\db_1)
LISTENER =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = awahaishi_lptp.sepocye.com)(PORT = 1521))
5. Restart the listener
6. create the data base link:
CREATE DATABASE LINK accessDB
CONNECT TO attend IDENTIFIED BY attend
USING 'attendoraclefds';
select * from EMP_JOBS@accessDB;
Error occures say :
ORA-28500: connection from ORACLE to a non-Oracle system returned this message:
ORA-28541: Error in HS init file on line 9.
ORA-02063: preceding 2 lines from AAL
Edited by: StillYoung on Mar 18, 2009 1:10 AMPlease see if the following link is helpful:
a question about transparent gateway,sb help me plz!! -
Can you use SQL Developer against non Oracle data bases?
If so, then how do you define the connection for non Oracle data bases?
Look, SQL Developer has got to be a 'gateway' into Oracle DBs from other databases. JDBC allows simple introspection and execution of SQL commands. So the 'explain' button won't be available, or some of the DDL stuff, big deal! Let them get a taste of what they are missing by not having an Oracle database.
If we can get non-Oracle developers (especially MS SQL Server) to use SQL Developer it will expose them to the superiority of the Oracle DB server.
If they have heterogenous services installed they are already an Oracle customer -- we have little additional DB server sale opportunity there. SQL Developer is a really sweet tool and it could be a real draw into the DB server sales.
SQL Developer must be easily usable by non-Oracle customers in order to help us sell the DB server to them! -
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 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... -
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... -
I added a new name in Address Book of my Mac and Sync'd it to my Curve.
The "name" is Passport and I changed a phone # to Custom "number".
It moved the name over but none of the other data.
Any thoughts? I don't have enough data to go out and buy a data base program.
GaryWhen I send an email to a smart group - nothing other than the email address is sent right?
Yes. You should set Mail not to show all the addresses in the group.
AK -
Validate Date and block JavaScript page change
how I can validate date acrobat, can block JavaScript page change, only change with a button?
If you use the "util.scand" method date validation is part of the process. It either returns the number of milliseconds from the Epoch date used by JavaScript for the date time object the null value.
Date Arithmetic has some sample scripts, but you need to keep in mind that Date and Time are not independent and using "new Date()" returns the date and time at the time that line of code is executed and that can cause issues for the computing of dates only.
Are you sure of day count, most differences include the start and end dates in the number of days for the calculation.
Custom calculation for today's date field (format is None):
// get today's date an time
var oToday = new Date();
// set to start of day
oToday.setFullYear(oToday.getFullYear(), oToday.getMonth(), oToday.getDate(), 0, 0, 0, 0)
// set field value
event.value = util.printd("d/mm/yyyy", oToday);
Custom calculation for the difference in days field (format None):
var cEnteredDate = this.getField("EnteredDate").value;
var cToday = this.getField("Today").value;
event.value = "";
if(cEnteredDate != "" && cToday != "") {
// process only if date values not empty
// convert date strings to date time objectat midnight
var oEnteredDate = util.scand("d/mm/yyyy", cEnteredDate );
if (oEnteredDate == null) {
app.alert("Error in processing entered date", 2, 0);
oEnteredDate.setFullYear(oEnteredDate.getFullYear(), oEnteredDate.getMonth(),oEnteredDate.getDate(), 0, 0, 0, 0)
var oToday = util.scand("d/mm/yyyy", cToday);
if(oToday == null) {
app.alert("Error converting today", 2,0);
oToday.setFullYear(oToday.getFullYear(), oToday.getMonth(),oToday.getDate(), 0, 0, 0, 0)
// convert date objects to days
var nEnteredDate = Math.floor(oEnteredDate.getTime() / (1000 * 60 * 60 * 24));
var nToday = Math.floor(oToday.getTime() / (1000 * 60 * 60 * 24));
// compute & format the difference
event.value = util.printf("%,0 1.0f", (nToday - nEnteredDate)); -
Standard Documentation for Add-on and Add-on's Data Base?
Hi!
I'd like to know if there is a stantard to create documentation for Add-On and Add-On's Data Base to get the Add-On's Certification.
Thanks!
William> When applying add-on images to our base the primary MSI's install just
> fine but none of the MST's and MSP's do not apply.
I meant to say that none of the MST's and MSP's apply. Sorry about that. -
Displaying images from MySQL data base
I'm currently developing a Master/Detail
page set. The MySQL table containing the Detail information includes a 'blob' (MIME: image/jpeg - Attributes - BINARY) for storing a small image. Under phpmyadmin the images show where applicable.
In my Detail page I display the results in a table. All the values display except the image.
I selected Insert > Image
When the 'Select Image Source' dialogue appeared set 'select file name from' to Data source
Selected the data base field from the established records set
I left the 'Format' as 'None'
Clicked OK
Have I omitted to set something? How does Dreamweaver or the PHP code know hto to render this field?
Hope someone can make some suggestions to resolve this.
Thanks
Cliff
Other possible useful info:
Developing on Windows XP
Dreamweaver CS5
all versions of MySQL, PHP, Apache, IE8, Dreamweaver up to date.In my desparation this morning
I even tried to set up a mirror of your example witha separate table (just the 3 fields) and even that didn't work. The Proxy member was the same as yours except that the script was changed to LocalPHP.php . Therefore I presume that the error must have been in the webpage. Unfortunately I've since deleted the code so I can't send a copy of what I used.
The only suggestions I could suggest that may help others that are novices are (1) suggested code for the webpage (2) a diagram illustrating how the elements link or relate to each other. Hope that is thought helpful.
Thanks again
Cliff
Maybe you are looking for
-
I'm writing this via a Windows Explorer browser window which should tell you the problem, or at least that I can't connect through Mozilla Firefox. Mozilla has been my default for years and I've always had Norton, 360 for the last few years. I've bee
-
Will a Thunderbolt external hard drive be able to boot the Thunderbolt MBP?
Are there Thunderbolt external hard drives available and will they be able to boot the Thunderbolt MBP? Thanks.
-
WLST writeTemplate keeps saying "No such file or directory"
having trouble writing a template on WLS 10 running under Ubuntu 7.10 Anyone see what I'm doing wrong? weblogic@lappy:~/templates$ pwd /home/weblogic/templates weblogic@lappy:~/templates$ ls -al total
-
Accident saving with an old version!
Hi! I by accident opened a document in my movies, saw this warning: "The project "test" was saved with an old version of iMovie HD. Opening it in this version will cause it to be upgraded, which will make it unreadadble by older versiond. Ar you sure
-
My wifi is unsuccessful... please help how to resolve
i have set up new connection , password is correct... everything is fine... but its not connecting to wifi... wifi unsuccessful error is coming... help me how to resolve... their is no support at apple's official web..