Data not saved in database
hi,
i'v a prob. that once i create quation through va21 then it create and saved data.
now when i create sales order through va01 then it show data saved and gave the sales order no.
but when i 'm going to change it then message comes order not in data base.
when i saw the data in table like vbak/ vbap then i found no data.
what is the prob.
pl. help me.
mukesh
Hi Mukesh,
May be the data is not saved at all. Use TCODE SM12 and SM13 to check if there are entries for the corresponding table under processing
Regards
Similar Messages
-
How to make the fields of BPM object not saved in database.
Is it possible to declare some attributes of BPM object not saved in database.
For example: Order has attribute orderId and date, user (other attributes)... we only want OBPM save orderId. We want the other attributes could be saved and retrieved by external DAO classes.
We still want to use the OOTB presentation from BPM object (not the customer jsp).
ThanksWhen you say:
Is it possible to declare some attributes of BPM object not saved in database.do you mean you do not want the information stored in the Oracle BPM Engine's database?
If this is the case, create a BPM Object with just two attributes. One would store your orderId as a primitive data type. The other attribute would be a BPM Object that would store all the other data you are going to retrieve from the external database.
At the beginning of the screenflow, read the database using the orderId attribute and populate the other attribute (the BPM Object). At the end of the screenflow just before it flows to the end activity, you could set the second attribute (again, the BPM Object attribute) to null. This would keep the BPM object with the two attributes from storing anything but the orderId in the Engine's database table for the work item instance.
Dan -
Manual Layout data not saving to trx cube
Hello BPS Experts,
I am trying to load some data using manual planning. I open the layout and enter the values and press save. I do not find any requests / data in the cube.
case 1) No error / warning
I do not get any error during the save function in the layout. What could be the possible step I am missing. What could be the root cause..
case 2) message - No data to be saved
sometimes i get a message 'No data to be saved'. And that data is not getting saved. What could be the reason of this message.
Regards,
BWer
Message was edited by: BWerHello BWer,
One of the main reasons for data not saving from a layout into a Trx cube, is if there is no key figure being updated. The value of the key figure being posted should <> 0.
If you choose the option to display transaction data in your layout, then, only data with key figure values <> 0 will be displayed.
Sunil -
Text fields populated from lov mapping are not saved to database
Hi Everyone,
I'm having a wierd problem. My requirement is to autopopulate two text fields field 2 and field 3 when a value is selected from lov in field1 and save all the values to database on click of a submit button.
Using lov mapping i'm able to populate field 2 and field 3 with corresponding values based on the value selected in field1. And also field2 and field3 should be in the readonly mode so that user cannot change the value.
So to make the fields readonly i have changed the property of readonly to true for field2 and field3. But if I change the readonly property, the values for field2 and field3 are not being saved to database.
The values are getting saved to database only when readonly = true for messageTextInput item type or if the item type is a form value.
I also tried disable = true, which also didnt work.
I tried to debug by writing some sop statements in PFR, but these statements also returned null for pageContext.getParameter("field2") etc;
Can anyone please tell me how to solve this problem?
Thanks
SunnyHi Gyan,
I forgot to mention that , I also tried messageStyledText. Which also didn't work. I wanted to use vo.setAttribute as my last option, but i wanted to understand why the values are not saved to database when the text item is showing the values on the page.
Thanks
Sunny -
Data not populating in database
Hi All
I am trying to insert data into a custom table but unable to do so...
Steps followed
1. Created a custom table
2. Created an EO based on the table
3. Created a VO associated with the EO.
4. Created AM and associated the VO with it.
5. Created page and associated it with the AM.
Controller Code
public void processRequest(OAPageContext pageContext, OAWebBean webBean)
super.processRequest(pageContext, webBean);
OAApplicationModule am = pageContext.getApplicationModule(webBean);
am.invokeMethod("initEmployee");
public void processFormRequest(OAPageContext pageContext, OAWebBean webBean)
super.processFormRequest(pageContext, webBean);
OAApplicationModule am = pageContext.getApplicationModule(webBean);
if("Next".equals(pageContext.getParameter("event")))
pageContext.setForwardURL("OA.jsp?page=/xx0801/oracle/apps/per/selfservice/val_assignment/webui/PhonePG", null, (byte)0, null, null, true, "N", (byte)99);
if("Save".equals(pageContext.getParameter("event")))
am.invokeMethod("createEmployee");
}AMImpl Code
public employeeAMImpl()
public void initEmployee()
OAViewObject vo = getEmployeeVO1();
if(!vo.isPreparedForExecution())
{vo.executeQuery();
Row row=vo.createRow();
vo.insertRow(row);
row.setNewRowState(Row.STATUS_INITIALIZED);
public void createEmployee()
getTransaction().commit();
...A new row does get created in the table but the data columns are empty only the creation date, created by, last_updated_by etc are getting populated.
Thanks
I have put the debug statement as follows:
public void createEmployee()
EmployeeVORowImpl emp = (EmployeeVORowImpl)getEmployeeVO1().getCurrentRow();
String name = emp.getEmployeeNumber().toString();
System.out.println("Emp Num: " + name);
getTransaction().commit();
}The employee number got printed in the messages. However the row still doesnot have any data except the created by, creation date etc
Edited by: Subhasish on Jan 12, 2011 3:38 AM
I have put the debug statement as follows:
public void createEmployee()
EmployeeVORowImpl emp = (EmployeeVORowImpl)getEmployeeVO1().getCurrentRow();
String name = emp.getEmployeeNumber().toString();
System.out.println("Emp Num: " + name);
getTransaction().commit();
}The employee number got printed in the messages. However the row still doesnot have any data except the created by, creation date etc
Edited by: Subhasish on Jan 12, 2011 3:38 AM
HELP: Formula Item data is not saved to database
Hi:
I've added a formula in a database item but when i commit the form the data is not saved to the database. When i am working on form the item reflects the formula value, but when i commit the value is not stored in the database.
I need urgent help.
Thanks
Joao Oliveira
It is not clearly stated in the help file I agree. With a little PLSQL code you could copy the item to a hidden database field and have it be saved to the database. See Note 43012.1 on Metalink for details.
Friends i have table and i have created a sequence on basis of that table.
For 1st page i have created an html region and made few items there and a save button.
I am filling data to the fields in page 1 and clicking the save button. In save button i have passed the address of the items of 1st page to items of 2nd page which contains the same field of page 1 and few more additional field.
the 2nd page which i have made is on basis of form on a table or view and taken exsisting sequence there. When i clicking the submit button in page 2 it is not updating my database and throwing error called unable to fetch row. Any suggestions on this?
Lev addition to this i wanted when my create button in 2nd page get clicks my database gets updated and also a query runs which checks the same data of combination variant_type,model_code,year_manuafacture. It means if i have 2 records in database with same variant_type,model_code,year_manufacture then in the field how_many in page 2 count of 3 gets updated and the other field solution avaiable get updated with Y.
For this in my local system in page 2 i created a plsql process and wrote this code and applied it with create button but its not working. Any idea where i am failing?
Declare
l_how_many Number;
l_sol_av Varchar2(1):= NULL;
Begin
select count(*)
into l_how_many
from quality
where 1=1
and variant_type= :P2_VARIANT_TYPE --'Road Bike'
and model_code = :P2_MODEL_CODE --'6'
and year_manufacture= :P2_YEAR_MANUFACTURE ; --'2000'
If l_how_many=null then
l_sol_av := 'N' ;
else
l_sol_av := 'Y';
end If ;
:P2_SOLUTION_AVAILABLE := l_sol_av;
:P2_HOW_MANY_RAISED := l_how_many;
Exception
when no_data_found then
null;
end;
ALV- Changing the output data and saving in database
hi friends,
I have to change the material description in the output and have to save the changes in database..
For changing the description I have to raise a pop-up, then I have to give the required change and then save..
How to do it?
My code is as follows:
TABLES : vbrk,vbrp,vbpa,adrc.
TYPE-POOLS : slis.
DATA: w_report_id LIKE sy-repid.
DATA: w_title TYPE lvc_title VALUE 'DIPLAY CUSTOMER BILLING DOCUMENT'.
DATA: w_layout TYPE slis_layout_alv.
DATA: w_fieldcat TYPE slis_t_fieldcat_alv.
DATA: w_events TYPE slis_t_event.
DATA: w_header TYPE slis_t_listheader.
DATA: sum LIKE vbrk-netwr.
SELECT-OPTIONS:
erdat FOR vbrk-erdat,
vkorg FOR vbrp-vkorg_auft,
kunag FOR vbrk-kunag.
DATA : BEGIN OF itab OCCURS 0,
fkdat TYPE vbrk-fkdat,
kunrg TYPE vbrk-kunrg,
name1 TYPE adrc-name1,
vbeln TYPE vbrk-vbeln,
augru_auft TYPE vbrp-augru_auft,
netwr TYPE vbrk-netwr,
waerk TYPE vbrk-waerk,
vbtyp TYPE vbrk-vbtyp,
fkart TYPE vbrk-fkart,
END OF itab.
DATA itab1 LIKE STANDARD TABLE OF itab.
SELECT vbrkfkdat vbrkkunrg adrcname1 vbrkvbeln vbrp~augru_auft
vbrknetwr vbrkwaerk
INTO TABLE itab1
FROM ( ( ( vbrk INNER JOIN vbrp ON vbrkvbeln = vbrpvbeln )
INNER JOIN vbpa ON vbpavbeln = vbrkvbeln )
INNER JOIN adrc ON adrcaddrnumber = vbpaadrnr )
WHERE vbtyp = 'O'
AND vbrk~erdat IN erdat
AND vbrp~vkorg_auft IN vkorg
AND vbrk~kunag IN kunag.
w_report_id = sy-repid.
PERFORM i_layout CHANGING w_layout.
PERFORM i_fieldcat CHANGING w_fieldcat.
SORT itab1 BY waerk fkart .
CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
EXPORTING
i_callback_program = 'ZTRAINING2'
i_grid_title = w_title
is_layout = w_layout
it_fieldcat = w_fieldcat
i_save = 'A'
TABLES
t_outtab = itab1
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.
*& Form i_fieldcat
text
-->P_W_FEILDCAT text
FORM i_fieldcat CHANGING p_w_feildcat.
DATA: l_line_fieldcat TYPE slis_fieldcat_alv.
CLEAR l_line_fieldcat.
l_line_fieldcat-fieldname = 'FKDAT'.
l_line_fieldcat-ref_tabname = 'ITAB1'.
l_line_fieldcat-edit_mask = '__-__-____'.
l_line_fieldcat-seltext_m = 'Billing Document date '.
APPEND l_line_fieldcat TO w_fieldcat.
CLEAR l_line_fieldcat.
l_line_fieldcat-fieldname = 'KUNRG'.
l_line_fieldcat-ref_tabname = 'ITAB1'.
l_line_fieldcat-seltext_m = 'Cust no'.
APPEND l_line_fieldcat TO w_fieldcat.
CLEAR l_line_fieldcat.
l_line_fieldcat-fieldname = 'NAME1'.
l_line_fieldcat-ref_tabname = 'ITAB1'.
l_line_fieldcat-seltext_m = 'Name of the reseller'.
APPEND l_line_fieldcat TO w_fieldcat.
CLEAR l_line_fieldcat.
l_line_fieldcat-fieldname = 'VBELN'.
l_line_fieldcat-ref_tabname = 'ITAB1'.
l_line_fieldcat-seltext_m = 'Billing document number'.
APPEND l_line_fieldcat TO w_fieldcat.
CLEAR l_line_fieldcat.
l_line_fieldcat-fieldname = 'AUGRU_AUFT'.
l_line_fieldcat-ref_tabname = 'ITAB1'.
l_line_fieldcat-seltext_m = 'Order reason'.
APPEND l_line_fieldcat TO w_fieldcat.
CLEAR l_line_fieldcat.
l_line_fieldcat-fieldname = 'NETWR'.
l_line_fieldcat-ref_tabname = 'ITAB1'.
l_line_fieldcat-seltext_m = 'Amount'.
APPEND l_line_fieldcat TO w_fieldcat.
CLEAR l_line_fieldcat.
l_line_fieldcat-fieldname = 'WAERK'.
l_line_fieldcat-ref_tabname = 'ITAB1'.
l_line_fieldcat-seltext_m = 'Currency'.
APPEND l_line_fieldcat TO w_fieldcat.
ENDFORM. "i_fieldcat
*& Form i_layout
text
-->P_W_LAYOUT text
FORM i_layout CHANGING p_w_layout.
CLEAR w_layout.
w_layout-colwidth_optimize = 'X'.
w_layout-edit = 'X'.
ENDFORM. " i_layout
Thanks,
Revathi Raju.
Check out the following link for top_of_page event in OOPs ALV.
https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/e8a1d690-0201-0010-b7ad-d9719a415907
You can also check out the following program.
DATA: save_ok LIKE sy-ucomm,
g_container TYPE scrfname VALUE 'CC1',
g_grid TYPE REF TO cl_gui_alv_grid,
g_custom_container TYPE REF TO cl_gui_custom_container,
gt_fieldcat TYPE lvc_t_fcat,
g_max TYPE i VALUE 100.
* declarations for top of page event
Data: gv_c_split type ref to cl_gui_splitter_container,
gv_c_ptv type ref to cl_gui_container,
gv_alv_ptv type ref to cl_gui_alv_grid,
o_dd_doc TYPE REF TO cl_dd_document,
text TYPE sdydo_text_element,
o_split type ref to cl_gui_easy_splitter_container,
o_top type ref to cl_gui_container,
o_bot type ref to cl_gui_container,
gv_c_vp type ref to cl_gui_container.
* end of declaration for top of page.
CLASS lcl_event_receiver DEFINITION DEFERRED.
*class lcl_application_dc definition deferred.
DATA: o_event_receiver TYPE REF TO lcl_event_receiver.
* g_dc type ref to lcl_application_dc.
DATA: gt_outtab TYPE TABLE OF sbook.
* CLASS lcl_event_receiver DEFINITION
CLASS lcl_event_receiver DEFINITION.
PUBLIC SECTION.
METHODS: handle_f4 FOR EVENT onf4 OF cl_gui_alv_grid
IMPORTING e_fieldname
es_row_no
er_event_data
et_bad_cells
e_display,
handle_top_of_page FOR EVENT top_of_page OF cl_gui_alv_grid
IMPORTING e_dyndoc_id.
METHODS: reset.
METHODS: show_f4.
PRIVATE SECTION.
* attributes for creating an own F4-Help
* (using a second ALV Grid Control
DATA: f4_grid TYPE REF TO cl_gui_alv_grid,
f4_custom_container TYPE REF TO cl_gui_custom_container.
TYPES: BEGIN OF ty_f4.
TYPES: value TYPE s_class.
TYPES: descr(20) TYPE c.
TYPES: END OF ty_f4.
DATA: f4_itab TYPE TABLE OF ty_f4.
DATA: f4_fieldcatalog TYPE lvc_t_fcat.
* attributes to store event parameters
* (after the CALL SCREEN command, the event parameters
* are not accessible)
TYPES: BEGIN OF onf4_event_parameters_type.
TYPES: c_fieldname TYPE lvc_fname.
TYPES: cs_row_no TYPE lvc_s_roid.
TYPES: cr_event_data TYPE REF TO cl_alv_event_data.
TYPES: ct_bad_cells TYPE lvc_t_modi.
TYPES: c_display TYPE char01.
TYPES: END OF onf4_event_parameters_type.
DATA: f4_params TYPE onf4_event_parameters_type.
* Methods to create own F4-Help
* (This is done using a second ALV Grid Control)
METHODS: init_f4.
METHODS: build_fieldcatalog.
METHODS: fill_f4_itab .
METHODS: on_double_click FOR EVENT double_click OF cl_gui_alv_grid
IMPORTING es_row_no.
ENDCLASS. "lcl_application_f4 DEFINITION
* CLASS lcl_event_receiver IMPLEMENTATION
CLASS lcl_event_receiver IMPLEMENTATION.
*§2. Implement an event handler method for event ONF4.
METHOD handle_f4.
* Save event parameter as global attributes of this class
* (maybe solved differently if you use a function module!)
f4_params-c_fieldname = e_fieldname.
f4_params-cs_row_no = es_row_no.
f4_params-cr_event_data = er_event_data.
f4_params-ct_bad_cells = et_bad_cells.
f4_params-c_display = e_display.
*§3. Call your own f4 help. To customize your popup check
* first if the cell is ready for input (event parameter E_DISPLAY).
* (parameter E_DISPLAY is checked later in method on_double_click)
* (Probably, you would call a function module at this point,
* pass the needed event parameter and call the popup screen
* within that function module. This is not done in this example
* to avoid scattering its code).
CALL SCREEN 101 STARTING AT 10 10.
*§7. Inform the ALV Grid Control that an own f4 help has been processed
* to suppress the standard f4 help.
er_event_data->m_event_handled = 'X'.
ENDMETHOD. "on_f4
METHOD show_f4.
* DATA: ls_outtab TYPE sbook.
* initialize own f4 help if needed
IF f4_custom_container IS INITIAL.
CALL METHOD init_f4.
ENDIF.
CALL METHOD fill_f4_itab.
* refresh list of values in f4 help and show it
CALL METHOD f4_grid->refresh_table_display.
* CAUTION: Do not use method REFRESH_TABLE_DISPLAY for
* your editable ALV Grid instances while handling events
* DATA_CHANGED or ONf4. You would overwrite intermediate
* values of your output table on frontend.
* 'f4_grid' is a non-editable ALV Grid Control for the
* application specific F4-Help. Therefore, calling
* REFRESH_TABLE_DISPLAY for this instance has no
* negative effect.
CALL METHOD cl_gui_cfw=>flush.
ENDMETHOD. "show_f4
METHOD init_f4.
DATA: ls_f4_layout TYPE lvc_s_layo.
* build fieldcatalog entries for f4
CALL METHOD build_fieldcatalog.
* create controls
CREATE OBJECT f4_custom_container
EXPORTING container_name = 'CC_ONF4'.
CREATE OBJECT f4_grid
EXPORTING i_parent = f4_custom_container.
* hide toolbar
ls_f4_layout-no_toolbar = 'X'.
CALL METHOD f4_grid->set_table_for_first_display
EXPORTING
is_layout = ls_f4_layout
CHANGING
it_fieldcatalog = f4_fieldcatalog
it_outtab = f4_itab.
* register event double click on backend
SET HANDLER me->on_double_click FOR f4_grid.
* flush since 'ls_layout' is local!
CALL METHOD cl_gui_cfw=>flush.
ENDMETHOD. "init_f4
METHOD fill_f4_itab.
DATA ls_f4_itab TYPE ty_f4.
* Delete all entries in f4_itab to determine
* offered values dynamically
CLEAR f4_itab[].
ls_f4_itab-value = 'C'.
ls_f4_itab-descr = text-t03. "Business Class
APPEND ls_f4_itab TO f4_itab.
ls_f4_itab-value = 'Y'.
ls_f4_itab-descr = text-t04. "Economie Class
APPEND ls_f4_itab TO f4_itab.
ls_f4_itab-value = 'F'.
ls_f4_itab-descr = text-t05. "First Class
APPEND ls_f4_itab TO f4_itab.
ENDMETHOD. "fill_f4_itab
METHOD build_fieldcatalog.
DATA: ls_fcat TYPE lvc_s_fcat.
CLEAR ls_fcat.
ls_fcat-fieldname = 'VALUE'.
ls_fcat-coltext = text-t02.
* ls_fcat-inttype = 'S_CLASS'.
ls_fcat-outputlen = 5.
APPEND ls_fcat TO f4_fieldcatalog.
CLEAR ls_fcat.
ls_fcat-fieldname = 'DESCR'.
ls_fcat-coltext = text-t01.
ls_fcat-inttype = 'C'.
ls_fcat-outputlen = 20.
APPEND ls_fcat TO f4_fieldcatalog.
ENDMETHOD. "build_fieldcatalog
METHOD on_double_click.
*§5. If not already caught by your own f4 help, check whether
* the triggered cell was ready for input by using E_DISPLAY
* and if not, exit.
IF f4_params-c_display EQ 'X'.
LEAVE SCREEN.
ENDIF.
*§6. After the user selected a value, pass it to the ALV Grid Control:
*§ 6a. Define a field symbol of type: LVC_T_MODI and a structure of
* type LVC_S_MODI to pass the value later on.
FIELD-SYMBOLS <itab> TYPE lvc_t_modi.
DATA: ls_modi TYPE lvc_s_modi,
ls_f4_itab TYPE ty_f4.
*§ 6b. Dereference attribute M_DATA into your field symbol and add
* the selected value to the table to which this symbol points to.
ASSIGN f4_params-cr_event_data->m_data->* TO <itab>.
ls_modi-row_id = f4_params-cs_row_no-row_id.
ls_modi-fieldname = f4_params-c_fieldname.
READ TABLE f4_itab INTO ls_f4_itab INDEX es_row_no-row_id.
ls_modi-value = ls_f4_itab-value.
APPEND ls_modi TO <itab>.
LEAVE TO SCREEN 0.
ENDMETHOD. "on_double_click
METHOD reset.
FIELD-SYMBOLS <itab> TYPE lvc_t_modi.
ASSIGN f4_params-cr_event_data->m_data->* TO <itab>.
CLEAR <itab>[].
ENDMETHOD. "reset
METHOD handle_top_of_page.
text = 'Top of page for program ZAMIT_SPLIT_CONTAINER'.
CALL METHOD e_dyndoc_id->add_text
EXPORTING text = text
sap_fontsize = 'LARGE'
sap_style = 'HEADING'.
CALL METHOD e_dyndoc_id->display_document
EXPORTING parent = o_top.
ENDMETHOD. "handle_top_of_page
ENDCLASS. "lcl_application_f4 IMPLEMENTATION
END-OF-SELECTION.
CALL SCREEN 100.
* MODULE PBO OUTPUT *
MODULE pbo OUTPUT.
SET PF-STATUS 'MAIN100'.
SET TITLEBAR 'MAIN100'.
IF g_custom_container IS INITIAL.
PERFORM create_and_init_alv CHANGING gt_outtab[]
gt_fieldcat.
ENDIF.
ENDMODULE. "pbo OUTPUT
* MODULE PAI INPUT *
MODULE pai INPUT.
save_ok = sy-ucomm.
CLEAR sy-ucomm.
CASE save_ok.
WHEN 'EXIT' OR 'BACK' OR 'CANCEL'.
PERFORM exit_program.
WHEN 'SWITCH'.
PERFORM switch_edit_mode.
WHEN OTHERS.
* do nothing
ENDCASE.
ENDMODULE. "pai INPUT
* FORM EXIT_PROGRAM *
FORM exit_program.
LEAVE PROGRAM.
ENDFORM. "exit_program
*& Form build_fieldcat
* text
* -->PT_FIELDCAT text
FORM build_fieldcat CHANGING pt_fieldcat TYPE lvc_t_fcat.
DATA ls_fcat TYPE lvc_s_fcat.
CALL FUNCTION 'LVC_FIELDCATALOG_MERGE'
EXPORTING
i_structure_name = 'SBOOK'
CHANGING
ct_fieldcat = pt_fieldcat.
LOOP AT pt_fieldcat INTO ls_fcat.
* Exchange smoker field with invoice field - just to
* make the dependance between SMOKER and CLASS more transparent
* (Smoking is only allowed in the first class).
IF ls_fcat-fieldname EQ 'SMOKER'.
ls_fcat-col_pos = 11.
ls_fcat-outputlen = 10.
ls_fcat-edit = 'X'.
* Field 'checktable' is set to avoid shortdumps that are caused
* by inconsistend data in check tables. You may comment this out
* when the test data of the flight model is consistent in your system.
ls_fcat-checktable = '!'. "do not check foreign keys
MODIFY pt_fieldcat FROM ls_fcat.
ELSEIF ls_fcat-fieldname EQ 'INVOICE'.
ls_fcat-col_pos = 7.
MODIFY pt_fieldcat FROM ls_fcat.
ELSEIF ls_fcat-fieldname EQ 'CLASS'.
ls_fcat-edit = 'X'.
ls_fcat-outputlen = 5.
ls_fcat-checktable = '!'. "do not check foreign keys
MODIFY pt_fieldcat FROM ls_fcat.
ENDIF.
ENDLOOP.
ENDFORM. "build_fieldcat
*& Form create_and_init_alv
* text
* -->PT_OUTTAB text
* -->PT_FIELDCAT text
FORM create_and_init_alv CHANGING pt_outtab TYPE STANDARD TABLE
pt_fieldcat TYPE lvc_t_fcat.
DATA: lt_exclude TYPE ui_functions,
ls_layout TYPE lvc_s_layo.
CREATE OBJECT g_custom_container
EXPORTING container_name = g_container.
* CREATE OBJECT g_grid
* EXPORTING i_parent = g_custom_container.
CREATE OBJECT gv_c_split
EXPORTING
* link_dynnr = lv_dynnr
* link_repid = lv_repid
parent = g_custom_container
rows = 2
columns = 1
EXCEPTIONS
cntl_error = 1
cntl_system_error = 2
others = 3 .
CALL METHOD gv_c_split->set_border
EXPORTING
border = space.
CALL METHOD gv_c_split->get_container
EXPORTING
row = 1
column = 1
RECEIVING
container = gv_c_ptv.
CALL METHOD gv_c_split->set_row_height
EXPORTING
id = 1
height = 20
EXCEPTIONS
cntl_error = 1
cntl_system_error = 2
OTHERS = 6 .
CALL METHOD gv_c_split->get_container
EXPORTING
row = 2
column = 1
RECEIVING
container = gv_c_vp .
CALL METHOD gv_c_split->set_row_height
EXPORTING
id = 2
height = 10
EXCEPTIONS
cntl_error = 1
cntl_system_error = 2
OTHERS = 3 .
CREATE OBJECT o_split
EXPORTING
parent = gv_c_ptv
with_border = 1
EXCEPTIONS
cntl_error = 1
cntl_system_error = 2
others = 3.
IF sy-subrc <> 0.
MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
ENDIF.
o_top = o_split->top_left_container.
o_bot = o_split->bottom_right_container.
CREATE OBJECT gv_alv_ptv
EXPORTING
i_parent = o_bot
EXCEPTIONS
error_cntl_create = 1
error_cntl_init = 2
error_cntl_link = 3
error_dp_create = 4
others = 5 .
CREATE OBJECT g_grid
EXPORTING
i_parent = gv_c_vp
EXCEPTIONS
error_cntl_create = 1
error_cntl_init = 2
error_cntl_link = 3
error_dp_create = 4
others = 5 .
PERFORM build_fieldcat CHANGING pt_fieldcat.
* Optionally restrict generic functions to 'change only'.
* (The user shall not be able to add new lines).
PERFORM exclude_tb_functions CHANGING lt_exclude.
PERFORM build_data CHANGING pt_outtab.
ls_layout-grid_title = 'F4 help implemented for field CLASS'.
CREATE OBJECT o_event_receiver.
SET HANDLER o_event_receiver->handle_top_of_page FOR gv_alv_ptv.
SET HANDLER o_event_receiver->handle_top_of_page FOR g_grid.
CREATE OBJECT o_dd_doc EXPORTING style = 'ALV_GRID'
no_margins = 'X'.
CALL METHOD gv_alv_ptv->set_table_for_first_display
EXPORTING
is_layout = ls_layout
CHANGING
it_outtab = pt_outtab[]
it_fieldcatalog = pt_fieldcat
EXCEPTIONS
invalid_parameter_combination = 1
program_error = 2
too_many_lines = 3
OTHERS = 4.
CALL METHOD g_grid->set_table_for_first_display
EXPORTING
it_toolbar_excluding = lt_exclude
is_layout = ls_layout
CHANGING
it_fieldcatalog = pt_fieldcat
it_outtab = pt_outtab[].
CALL METHOD gv_alv_ptv->list_processing_events
EXPORTING
i_event_name = 'TOP_OF_PAGE'
i_dyndoc_id = o_dd_doc.
* register f4 for field CLASS
PERFORM register_events.
* Set editable cells to ready for input initially
CALL METHOD g_grid->set_ready_for_input
EXPORTING
i_ready_for_input = 1.
ENDFORM. "CREATE_AND_INIT_ALV
*& Form exclude_tb_functions
* text
* -->PT_EXCLUDE text
FORM exclude_tb_functions CHANGING pt_exclude TYPE ui_functions.
* Only allow to change data not to create new entries (exclude
* generic functions).
DATA ls_exclude TYPE ui_func.
ls_exclude = cl_gui_alv_grid=>mc_fc_loc_copy_row.
APPEND ls_exclude TO pt_exclude.
ls_exclude = cl_gui_alv_grid=>mc_fc_loc_delete_row.
APPEND ls_exclude TO pt_exclude.
ls_exclude = cl_gui_alv_grid=>mc_fc_loc_append_row.
APPEND ls_exclude TO pt_exclude.
ls_exclude = cl_gui_alv_grid=>mc_fc_loc_insert_row.
APPEND ls_exclude TO pt_exclude.
ls_exclude = cl_gui_alv_grid=>mc_fc_loc_move_row.
APPEND ls_exclude TO pt_exclude.
ENDFORM. " EXCLUDE_TB_FUNCTIONS
*& Form build_data
* text
* --> p1 text
* <-- p2 text
FORM build_data CHANGING pt_outtab TYPE STANDARD TABLE.
DATA: ls_sbook TYPE sbook,
l_index TYPE i.
SELECT * FROM sbook INTO TABLE gt_outtab UP TO g_max ROWS.
IF sy-subrc NE 0.
PERFORM generate_entries CHANGING pt_outtab.
ENDIF.
LOOP AT pt_outtab INTO ls_sbook.
l_index = sy-tabix.
CLEAR ls_sbook-class.
* Alternate between smoker and non smoker to make
* it more obvious what this example is about
l_index = l_index MOD 2.
IF l_index EQ 1.
ls_sbook-smoker = 'X'.
ELSE.
ls_sbook-smoker = ' '.
ENDIF.
MODIFY pt_outtab FROM ls_sbook.
ENDLOOP.
ENDFORM. " build_data
*& Form generate_entries
* text
* -->PT_SBOOK text
FORM generate_entries CHANGING pt_sbook TYPE STANDARD TABLE.
DATA: ls_sbook TYPE sbook,
l_month(2) TYPE c,
l_day(2) TYPE c,
l_date(8) TYPE c,
l_prebookid TYPE i.
ls_sbook-carrid = 'LH'.
ls_sbook-connid = '0400'.
ls_sbook-forcurkey = 'DEM'.
ls_sbook-loccurkey = 'USD'.
ls_sbook-custtype = 'B'.
DO 110 TIMES.
l_prebookid = sy-index.
ls_sbook-forcuram = sy-index * 10.
ls_sbook-loccuram = ls_sbook-loccuram * 2.
ls_sbook-customid = sy-index.
ls_sbook-counter = 18.
ls_sbook-agencynum = 11.
l_month = sy-index / 10 + 1.
DO 2 TIMES.
l_day = 3 + l_month + sy-index * 2.
l_date+0(4) = '2000'.
l_date+4(2) = l_month.
l_date+6(2) = l_day.
ls_sbook-fldate = l_date.
SUBTRACT 3 FROM l_day.
ls_sbook-order_date+0(6) = l_date+0(6).
ls_sbook-order_date+6(2) = l_day.
ls_sbook-bookid = l_prebookid * 2 + sy-index.
IF sy-index EQ 1.
ls_sbook-smoker = 'X'.
ELSE.
ls_sbook-smoker = space.
ENDIF.
ls_sbook-luggweight = l_prebookid * 10.
IF ls_sbook-luggweight GE 1000.
ls_sbook-wunit = 'G'.
ls_sbook-class = 'C'.
ELSE.
ls_sbook-wunit = 'KG'.
ls_sbook-class = 'Y'.
ENDIF.
IF ls_sbook-bookid > 40 AND ls_sbook-wunit EQ 'KG'.
ls_sbook-invoice = 'X'.
ENDIF.
IF ls_sbook-bookid EQ 2.
ls_sbook-cancelled = 'X'.
ls_sbook-class = 'F'.
ENDIF.
APPEND ls_sbook TO pt_sbook.
ENDDO.
ENDDO.
ENDFORM. " generate_entries
*& Form register_events
* text
FORM register_events.
*§1. Register event ONF4 at frontend using method
* register_f4_for_fields. For this purpose, you pass a table
* with all fields, for which you want to implement your own
* f4 help.
* remark: If you want to use an own f4 help for fields where
* no standard f4 help exists set field F4AVAILABL for
* this field in the fieldcatalog.
DATA: lt_f4 TYPE lvc_t_f4 WITH HEADER LINE.
CLEAR lt_f4.
lt_f4-fieldname = 'CLASS'.
* If you would like to deregister the field again,
* pass value SPACE with field 'register'.
lt_f4-register = 'X'.
*§ 1b. If the value range in your f4 help depends on other
* values of cells that are input enabled, set the
* GETBEFORE parameter.
* The consequence is that the ALV Grid Control raises
* event DATA_CHANGED before the f4 help is called to
* check values that the f4 help depends on.
lt_f4-getbefore = 'X'.
* The next parameter is used to change values after onf4 has
* been processed. The ALV Grid Control will raise
* event DATA_CHANGED afterwards, if you set it.
lt_f4-chngeafter = space.
INSERT TABLE lt_f4.
CALL METHOD g_grid->register_f4_for_fields
EXPORTING
it_f4 = lt_f4[].
* register events for abap objects (backend)
SET HANDLER o_event_receiver->handle_f4 FOR g_grid.
ENDFORM. " register_events
* MODULE status_0101 OUTPUT
MODULE status_0101 OUTPUT.
SET PF-STATUS 'POPUP'.
SET TITLEBAR 'POPUP'.
CALL METHOD o_event_receiver->show_f4.
ENDMODULE. " STATUS_0101 OUTPUT
*& Module USER_COMMAND_0101 INPUT
* text
MODULE user_command_0101 INPUT.
PERFORM user_command.
ENDMODULE. " USER_COMMAND_0101 INPUT
*& Form user_command
* text
FORM user_command.
DATA: save_ok TYPE sy-ucomm.
save_ok = sy-ucomm.
CLEAR sy-ucomm.
CASE save_ok.
WHEN 'CANCEL'.
CALL METHOD o_event_receiver->reset.
LEAVE TO SCREEN 0.
ENDCASE.
ENDFORM. "user_command
*& Form switch_edit_mode
* text
FORM switch_edit_mode.
IF g_grid->is_ready_for_input( ) EQ 0.
* set edit enabled cells ready for input
CALL METHOD g_grid->set_ready_for_input
EXPORTING
i_ready_for_input = 1.
ELSE.
* lock edit enabled cells against input
CALL METHOD g_grid->set_ready_for_input
EXPORTING
i_ready_for_input = 0.
ENDIF.
ENDFORM. "switch_edit_mode
For popup try this
reward if helpfull
Regards
Pavan
Response data not saved in PDF
Dear All,
I created an interactive form with a web service. I filled in the form and sent all the datas in SAP through the web service.
All worked properly except that I have a return message from SAP. This message is binded in my form as response field.
I saw my message in the form when the WS is finished but I saved the PDF on my PC.
When I look at my PDF later, the return message is disappeared, it is not saved in my PDF as all the other fields.
Thanks to help me
Kind regards
Véronique.
Dear all,
Can someone help me ?
All the other data are saved in the document. But I think that it is because the return message is not keyed but is only a answer in the web service, the PDF can't save it ?
If I change the field (add some character after the return value from SAP) and I save, the value is kept.
Could someone tell me how to do ?
My button is an Execute one with the data connection on my web service.
If I re-merge data, all the fields become empty except the response return message. Even in this case, the message is not saved in the PDF.
It is important !
Thanks
Kind regards
Véronique
Hierarchy Data not saved after Hierarchy Load
Hi Gurus,
I am facing a problem with the hierarchy data load in SAP BPC NW 7.5 SP06. I have already used /CPMB/IMPORT_IOBJ_MASTER & /CPMB/IMPORT_IOBJ_HIER once to load the data from BI to BPC and it worked fine that time.
Now I have made some changes in the Hierarchy at the BI side. When I run the package link list, the /CPMB/IMPORT_IOBJ_MASTER chain runs fine and the master data, description for Attribute and Hierarchies are loaded perfectly. But whn the /CPMB/IMPORT_IOBJ_HIER is run, the changes are not saved in the BPC Member sheet. I have manually make the changes in the member sheet and Process the Dimension.
Can we process the Dimension explicitly after the Hierarchy load again?
Does anyone have an idea about this?
Any help is appreciated.
Thanks,
Abhishek
Abhishek,
Double check whether /CPMB/IMPORT_IOBJ_MASTER is bringing all the ID's,Texts and Hierarchy Nodes. If required drop the data from dimesion member sheet and load it again.
Double check the Hierarchy and level setup while running /CPMB/IMPORT_IOBJ_HIER.
(when we are in SP05, it was not bringing the multiple Hierarchies, now we are in SP07 loading multiple hierarchies but not the TEXT fo the Id's some inconsistency)
Thanks
Data not saving in Custom Infotype
Dear Experts,
I have created a custom infotype, 9003, for this I creates a structure ps9003.
And I have to create a primary key field in my infotype, so I added a field in PA9003 as key field.
Now this key field was not coming in the infotype screen, so I added it using screen painter.
But now when I save the data the data is not saved in this key filed.
Please Suggest.
Warm Regards,
Upendra Agrawal
Hi
As of my knowledge the primary key for the PA infotypes will be MANDT+PAKEY structure. What is the need of adding the primary key.
- While creating the custom infotype using PM01 screen will be automatically generated for the fields declared in PS structure
- Screen Generation will wipe out the custom written on the fields so this is to be carefully handled.
- if you added the field check logic in PAI & PBO
- Check are you passing the data back to the infotye structure
Data not saving in flowable form
Hi,
I have created a form where there are flowable and positioned parts. In the attachment section, data entered into Attachment A (flowable) seems to save, but after saving, closing and re-opening, the data has not saved. The data entered into Attachment B and the rest of the form does save.
Can I send the file to someone to have a look?
Thanks.
Please send your form to [email protected]
I will try to look into the issue..
Nith
File- XI- IDoc: Idoc header data not saved correctly
Hi guys!
I have a very strange problem:
I have a file to xi to IDoc scenario. Everything seems to be fine, IDoc is created in target system, but with strange error: <MESCOD>XX</MESCOD> segment is not written in IDoc header segment. This segment is available in message sent to ECC (after mapping), so there is no problem with ommiting the segment in mapping. But it's not saved.
This scenario worx fine in QA, but not in PRO.
Any ideas, what to look at?
Thanx a lot! Olian
Hi,
check the IDoc which was in PROD. and see the ibound status and actual reason .
depending upon the actual status you can resolve the issue.
Chilla
JDev 9.0.3.3 Data not saved to DB when using Non-Transaction DataSource
Hi,
Env: JDev 9.0.3.3/WL 6.0 sp1/Oracle 8i
We have successfully deployed our application in 3-tier(remote mode) in JDev 9.0.3.2. using JClient, EO/VO, EJB Session Facade (BMT).
Now we are planning to use JDev 9.0.3.3 (build 1205)
We are using ejb.txn.type=local and Weblogic DataSource(non-txn).
In JDev 9033, after commit the data is not getting saved to DB. No errors in the log below.
This works fine in JDev 9032.
This does not work with simple Master Detail and also with single row simple form.
==========================================
[281] BaseSQLBuilder Executing DML ... (Update)
[282] Executing DML...
[283] UPDATE CISDBA.DCX_BASE_COST_V BaseCost SET ITEM_STAT=?,TID=? WHERE PART_NUM=? AND MY=?
[284] cStmt = conn.prepareCall(" UPDATE CISDBA.DCX_BASE_COST_V BaseCost SET ITEM_STAT=?,TID=? WHERE PART_NUM=? AND MY=?"); // JBO-JDBC-INTERACT
[285] cStmt.setObject(1, new BigDecimal((double) 2.0)); /*ItemStat*/ // JBO-JDBC-INTERACT
[286] cStmt.setObject(2, "t2733bx"); /*Tid*/ // JBO-JDBC-INTERACT
[287] cStmt.setObject(3, "04782612AA"); /*PartNum*/ // JBO-JDBC-INTERACT
[288] cStmt.setObject(4, "2004"); /*My*/ // JBO-JDBC-INTERACT
[289] cStmt.execute(); // JBO-JDBC-INTERACT
[290] cStmt.close(); // JBO-JDBC-INTERACT
BaseCostImpl: after doDML
BaseCostImpl: End of doDML()...
BaseCostInvestCost VO before postChanges...
this.getWhereClause(): null
isDirty() before executeQuery...
this.getWhereClause(): null
isDirty() after executeQuery...
BaseCostInvestCost VO before postChanges...
this.getWhereClause(): null
isDirty() before executeQuery...
this.getWhereClause(): null
isDirty() after executeQuery...
[291] BaseSQLBuilder: releaseSavepoint 'BO_SP' ignored
[292] BaseSQLBuilder: setSavepoint 'BO_SP' ignored
BaseCostInvestCost VO before postChanges...
this.getWhereClause(): null
isDirty() before executeQuery...
this.getWhereClause(): null
isDirty() after executeQuery...
BaseCostInvestCost VO before postChanges...
this.getWhereClause(): null
isDirty() before executeQuery...
this.getWhereClause(): null
isDirty() after executeQuery...
[293] BaseSQLBuilder: releaseSavepoint 'BO_SP' ignored
[294] EJBTxnHandler: Commited txn
[BaseCostInvestCostViewImpl.afterCommit] Enter
[295] BaseCostInvestCostView2 notify COMMIT ...
[BaseCostInvestCostViewImpl.afterCommit] Exit
[BaseCostInvestCostViewImpl.afterCommit] Enter
[296] BaseCostInvestCostView1 notify COMMIT ...
[BaseCostInvestCostViewImpl.afterCommit] Exit
[297] SubDept2SubProgView1 notify COMMIT ...
[298] InvSubDeptLOV1 notify COMMIT ...
[299] SubProg2SubDeptView1 notify COMMIT ...
[300] SubProgramLOV1 notify COMMIT ...
[301] StdCostView1 notify COMMIT ...
[302] AltCostView1 notify COMMIT ...
[303] PlantCodeView1 notify COMMIT ...
[304] PaperCarView1 notify COMMIT ...
[305] InvestCostItemView1 notify COMMIT ...
[306] SavedSearchView1 notify COMMIT ...
[307] AltCostView1_BaseInvestToAltViewLink_AltCostView notify COMMIT ...
[308] InvestCostItemView1_BaseInvestToInvestItemViewLink_InvestCostItemView notify COMMIT ...
[309] PaperCarView_BaseCostTrackedVehicleViewLink_PaperCarView notify COMMIT ...
[310] VehicleProgramLOV1 notify COMMIT ...
[311] SubDeptLOV1 notify COMMIT ...
[312] Transaction timeout set to 28800 secs
[313] [NavigationEvent: BaseCostInvestCostView1 From 0 to 1]
[314] Column count: 14
[315] ViewObject : Reusing defined prepared Statement
[316] Binding param 1: 769661
[317] Binding param 2: 2004
[318] [RangeRefreshEvent: AltCostView1 start=-1 count=0]
[319] Column count: 13
[320] ViewObject : Reusing defined prepared Statement
[321] Binding param 1: 769661
[322] [RangeRefreshEvent: PaperCarView1 start=0 count=6]
[323] Column count: 4
[324] ViewObject : Reusing defined prepared Statement
[325] Binding param 1: INV37
[326] [RangeRefreshEvent: InvestCostItemView1 start=0 count=1]
[327] [NavigationEvent: AltCostView1 From -1 to -1]
[328] [NavigationEvent: PaperCarView1 From -1 to 0]
[329] [NavigationEvent: InvestCostItemView1 From -1 to 0]
========================================================
Hi Carsten,
I tried to reproduce your problem, but couldn't. Let me explain what steps I executed and perhaps you can advise where I've not matched your steps.
--Using build jdeveloper 9.0.3.3.1203, I built a new bc4j project containing a dept-emp default bc4j project (deptEntity, empEntity, deptView, empView, deptempFKAssoc, deptempFKViewLink, ApplicationModule).
--In dos shell, I went to the directory \jdevdir\jdev\bin and ran setvars -go to set the correct jdk version
--In the dos shell, in the directory \jdevdir\j2ee\home I executed the following command to install oc4j:
java -jar oc4j.jar (defaults pswd to welcome for admin)
--I remoted the appmodule to EJB Session Bean (BMT) and created a new deployment profile using the 9ias configuration for the application module.
--I deployed the bc4j objects to oc4j
--I created a new project
--In this project I created a new jclient master-detail form using the above project's application module for the data model
--I saved all and compiled the jclient project
--I ran the jclient form and inserted a master record
--I committed the transaction successfully
--I browsed records, then edited a record
--I committed the transaction successfully, then browsed.
Is there something I've missed? Did you migrate your project and not start by creating a new project? Is there something special about the database schema you are using?
Thanks,
Amy
hi,
I need to customize a standard form, so I add a new window(W) and two blocks. Blocks have master(M)-detail(D) relations. Also there is a new button(B) in one standard block to call W.
Of course, A and B are database blocks.
When B is pressed, I read one standard block, search more information in database and then populate A and B. The user can modify data or save directly.
The problem occurs when the users save. Nothing happens.
When the save button is pressed appears the FRM-40400 message (X records save) like everithing goes well, but really nothing appears in database tables.
Thans for help.
David.
I don't know what to do now.
I try everything.
DML Data Target Type property is OK.
Database Item/Block properties are OK.
I can find with my tests that the problem occurs only saving data. If table has data and I do an execute_query, the blocks populate ok.
I'm thinking that standard libraries, only let to do a commit to such fields or blocks with a concrete status. Is this posible?
Thanks to all.
Maybe you are looking for
-
using action script 2 how can i send a variable value to a dynamic textbox on a different keyframe?
-
Ever since I upgraded to itunes 7, my ipod will not work with itunes. It is recognized in windows and itunes. It says my ipod is corrupt and needs to be restored. I hit the restore buttton and after awhile it has an unknown error 1418 saying it canno
-
Acrobat 9 and Office 2010 pdfmaker ribbon
We are an adult training institution using the latest Microsoft Office Pro and Creative Suite Design Premium suites. (Currently 2010/CS5) Pdfmaker has been a key part of the PDF Basics syllabus for some time and to have to wait till the end of 2011 f
-
Drat, Drat, and DOUBLE DRAT! Ok, so, yesterday, I went to the T-Mobile store to return the loaner phone (and be refunded the $53.01 i had to pay to leave with it) and the WebConnect stick. I also called T-Mobile to be sure of what I had to return of
-
How do I send a voice memo through a text message (iOS 8.1.3)?
How do I send a voice memo through a text message (iOS 8.1.3)?