Problem: Z table data updates using SM30
Hi,
I have a requirement, while updating records in a Z table
using SM30 Transaction.
The Structure of the table is below:
APMOD Primary Key Char(3)
KONST Primary Key Char(20)
ENDDA Primary Key DATS
BEGDA Non Key DATS
and some other non key fields....
Problem: This table should act something like Infotype in HR. I mean Delimition of Records while creating or changeing the existing record.
Say there is a record
APMOD = OGMT
KONST = Organization Management
BEGDA = 01/01/2004
ENDDA = 12/31/9999
Whenever i am Inserting a new record with key
APMOD = OGMT and KONST = 'Organization Management'
and BEGDA = '01/01/2006'.
First it should update the old record with
BEGDA = 01/01/2004 and ENDDA = 12/31/2005
Then the new record needs to be inserted with
BEGDA = 01/01/2006 and ENDDA = 12/31/9999.
How can I achieve this using SM30? Can we write our own code somewhere? If yes Where and How? Or is there any settings available for this requirement?
I can write a Z program to update this Table, but i should achieve this using SM30 only.
Let me know if you need any additional info.
Regards,
Sudhakar.
Hi Sudhakar,
1. I tried the same at my end. It works fantastic !
In SM30 it shows
'Delimit' Button
'Expand <--> Collapse' Button.
and accordingly delmits the records.
2. in SE11,
Use the menu
Utilities ---> Table Maintenance Generator
and finally build a table maintenance
to use in SM30.
3. When u use in SM30,
u will achieve what u want.
4. Just make sure your field
ENDDA has the data element ENDDA
in table definition.
It should also be key.
5. After this ENDDA column,
there should be no other key column
( not even BEGDA)
I Hope it helps.
Regards,
Amit M.
Similar Messages
-
How to display table data without using ALV and table element.
Hi,
Its possible to display table data without using ALV and table element.
Every time i am fetching data based on (customer,status) fields and displaying these data in my output using alv
(every time i am fetching single row data ),
But problem is alv occupying more space in the output , i want to display data part only i dont want field names,
settings and header data etc..things.
Give solution to display data part..
Regards,
Rakhi.Hi,
Does you mean that you need ALV without default Function Toolbar...? If this is the case, the easy solution would have been to use Table Element rather. But, if you need to use ALV only without Function Toolbar, you can do away with that as well.
In that case, after calling GET_MODEL, you need to add few more lines of codes to achieve your goal. Those lines are --
DATA LV_VALUE TYPE REF TO CL_SALV_WD_CONFIG_TABLE.
LV_VALUE = LO_INTERFACECONTROLLER->GET_MODEL(
* Standard Filter Function setting to FALSE
LV_VALUE->IF_SALV_WD_STD_FUNCTIONS~SET_SORT_COMPLEX_ALLOWED( ABAP_FALSE ).
LV_VALUE->IF_SALV_WD_STD_FUNCTIONS~SET_FILTER_COMPLEX_ALLOWED( ABAP_FALSE ).
LV_VALUE->IF_SALV_WD_STD_FUNCTIONS~SET_FILTER_FILTERLINE_ALLOWED( ABAP_FALSE ).
LV_VALUE->IF_SALV_WD_STD_FUNCTIONS~SET_DISPLAY_SETTINGS_ALLOWED( ABAP_FALSE ).
LV_VALUE->IF_SALV_WD_STD_FUNCTIONS~SET_VIEW_LIST_ALLOWED( ABAP_FALSE ).
LV_VALUE->IF_SALV_WD_STD_FUNCTIONS~SET_SORT_HEADERCLICK_ALLOWED( ABAP_FALSE ).
LV_VALUE->IF_SALV_WD_STD_FUNCTIONS~SET_HIERARCHY_ALLOWED( ABAP_FALSE ).
* Standard Filter Function setting to FALSE Ends
Here as you can easily notice that LV_VALUE is instantiated on CL_SALV_WD_CONFIG_TABLE. Now, using this LV_VALUE, you set standard functions as False to dis-allow their display.
Hope this answers your query.
Thanks.
Kumar Saurav. -
Due date update using GP APIs?
Hi all
I am working on the Due date update using GP APIs, I have done it at the "process" level. However I dont know how to trigger it at an activity level using GP APIs.
Please tell me how to gain access to the Activity (Action) instance of the next processor from the current one? I have set the Due date statically at the process and activity level. Now I wish to allow the user to change the due date dynamically using GP APIs at the <b>activity</b> level.
Ideas pls......
regards
LNVAn other one!! I have set the due date manually in the process yet I dont see it in the UWL. Any thoughts on this? Thanks again.
-
GUI_UPLOAD problem if input data is using Excel
Hi , Some one can answer this quick question.
While i am using GUI_upload i am not able to recieve the data properly.
GUI UPLOAD From Data
CALL FUNCTION 'GUI_UPLOAD'
EXPORTING
FILENAME = lvs_filenm
FILETYPE = 'ASC'
HAS_FIELD_SEPARATOR = 'X'
HEADER_LENGTH = 0
READ_BY_LINE = 'X'
DAT_MODE = ' '
CODEPAGE = ' '
IGNORE_CERR = ABAP_TRUE
REPLACEMENT = '#'
CHECK_BOM = ' '
VIRUS_SCAN_PROFILE =
NO_AUTH_CHECK = ' '
IMPORTING
FILELENGTH =
HEADER =
its not working properly . can i give any has field separtor like 'X'
And i copied the same data in excel to text file. GUI_upload is working fine and data is exactly coming in to the internal table.
GUI UPLOAD From Data
CALL FUNCTION 'GUI_UPLOAD'
EXPORTING
FILENAME = lvs_filenm
FILETYPE = 'DAT'
HAS_FIELD_SEPARATOR = 'X'
HEADER_LENGTH = 0
READ_BY_LINE = 'X'
DAT_MODE = ' '
CODEPAGE = ' '
IGNORE_CERR = ABAP_TRUE
REPLACEMENT = '#'
CHECK_BOM = ' '
VIRUS_SCAN_PROFILE =
NO_AUTH_CHECK = ' '
IMPORTING
FILELENGTH =
HEADER =
Any one can help me out in this regard. Client wants to use GUI_upload functional module only...Hi vamsi,
I will send sample code along with flat file.I will attach flat file at the end of program check it once.This program works fine for me for XLS FILE.
*& Report YBDC_UPLOAD_MM01_XLS *
*& DEVELOPER : KIRAN KUMAR.G *
*& PURPOSE : MAKE CHANGES TO DOWNLOADED FILE AND UPLOAD THE FILE *
*& CREATION DT: 3/12/2007 *
*& REQUEST : ERPK900035 *
REPORT YBDC_UPLOAD_MM01_XLS.
Tables
TABLES : mara. "General Material Data
Global BDCDATA Structure and MESSAGE Structure
DATA: gt_bdcdata LIKE bdcdata OCCURS 0 WITH HEADER LINE,
gt_msgtab LIKE bdcmsgcoll OCCURS 0 WITH HEADER LINE.
Global Variables
DATA: gv_infile TYPE string,
gv_msg TYPE string,
gv_update VALUE 'A'.
Internal Table
DATA: BEGIN OF gt_data OCCURS 0,
matnr(20), "Material Number
mbrsh(20), "Account Group
mtart(20), "Material Type
meins(20), "Base Unit Of Measure
maktx(20), "Material Description
END OF gt_data.
Selection-screen
SELECTION-SCREEN : BEGIN OF BLOCK b1 WITH FRAME TITLE text-001.
PARAMETERS: p_file LIKE rlgrap-filename,
p_mode.
SELECTION-SCREEN : END OF BLOCK b1.
Select the File
AT SELECTION-SCREEN ON VALUE-REQUEST FOR p_file.
PERFORM fetch_file.
START-OF-SELECTION.
Fetch Data From XLS File
PERFORM fetch_data.
Fetch Data From XLS File
PERFORM delete_headerinfo.
Fetch Data From XLS File
PERFORM place_data.
*& Form fetch_file
text
--> p1 text
<-- p2 text
FORM fetch_file .
CALL FUNCTION 'F4_FILENAME'
EXPORTING
program_name = syst-cprog
dynpro_number = syst-dynnr
FIELD_NAME = ' '
IMPORTING
file_name = p_file.
gv_infile = p_file.
ENDFORM. " fetch_file
*& Form fetch_data
text
--> p1 text
<-- p2 text
FORM fetch_data .
refresh : gt_data. "Clear Body Of the Internal Table
clear : gt_data. "Clear Header Line
CALL FUNCTION 'GUI_UPLOAD'
EXPORTING
filename = gv_infile
filetype = 'ASC'
has_field_separator = 'X'
HEADER_LENGTH = 0
READ_BY_LINE = 'X'
DAT_MODE = ' '
IMPORTING
FILELENGTH =
HEADER =
TABLES
data_tab = gt_data
EXCEPTIONS
file_open_error = 1
file_read_error = 2
no_batch = 3
gui_refuse_filetransfer = 4
invalid_type = 5
no_authority = 6
unknown_error = 7
bad_data_format = 8
header_not_allowed = 9
separator_not_allowed = 10
header_too_long = 11
unknown_dp_error = 12
access_denied = 13
dp_out_of_memory = 14
disk_full = 15
dp_timeout = 16
OTHERS = 17
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. " fetch_data
*& Form place_data
text
--> p1 text
<-- p2 text
FORM place_data .
LOOP AT gt_data.
PERFORM bdc_dynpro USING 'SAPLMGMM' '0060'.
PERFORM bdc_field USING 'BDC_CURSOR'
'RMMG1-MATNR'.
PERFORM bdc_field USING 'BDC_OKCODE'
'=AUSW'.
PERFORM bdc_field USING 'RMMG1-MATNR'
gt_data-matnr.
PERFORM bdc_dynpro USING 'SAPLMGMM' '0070'.
PERFORM bdc_field USING 'BDC_CURSOR'
'MSICHTAUSW-DYTXT(01)'.
PERFORM bdc_field USING 'BDC_OKCODE'
'=ENTR'.
PERFORM bdc_field USING 'MSICHTAUSW-KZSEL(01)'
'X'.
PERFORM bdc_dynpro USING 'SAPLMGMM' '4004'.
PERFORM bdc_field USING 'BDC_OKCODE'
'=BU'.
PERFORM bdc_field USING 'BDC_CURSOR'
'MAKT-MAKTX'.
PERFORM bdc_field USING 'MAKT-MAKTX'
gt_data-maktx.
PERFORM bdc_field USING 'MARA-MTPOS_MARA'
'NORM'.
CALL TRANSACTION 'MM02' USING gt_bdcdata MODE p_mode
UPDATE gv_update
MESSAGES INTO gt_msgtab.
*For Error Messages Handling.
LOOP AT gt_msgtab.
CALL FUNCTION 'FORMAT_MESSAGE'
EXPORTING
id = sy-msgid
lang = sy-langu
no = sy-msgno
v1 = sy-msgv1
v2 = sy-msgv2
v3 = sy-msgv3
v4 = sy-msgv4
IMPORTING
msg = gv_msg
EXCEPTIONS
not_found = 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.
IF sy-tabix = 1.
WRITE: / 'Process Log' COLOR 3.
ENDIF.
WRITE:/ gv_msg.
ENDLOOP.
REFRESH gt_msgtab.
REFRESH gt_bdcdata.
ENDLOOP.
ENDFORM. " place_data
Start new screen *
FORM bdc_dynpro USING program dynpro.
CLEAR gt_bdcdata.
gt_bdcdata-program = program.
gt_bdcdata-dynpro = dynpro.
gt_bdcdata-dynbegin = 'X'.
APPEND gt_bdcdata.
ENDFORM. "BDC_DYNPRO
Insert field *
FORM bdc_field USING fnam fval.
CLEAR gt_bdcdata.
gt_bdcdata-fnam = fnam.
gt_bdcdata-fval = fval.
APPEND gt_bdcdata.
ENDFORM. "BDC_FIELD
*& Form delete_headerinfo
text
--> p1 text
<-- p2 text
FORM delete_headerinfo .
DELETE gt_data INDEX 1.
ENDFORM. " delete_headerinfo
FLAT FILE
*MATERIAL NUMBER INDUSTRY SECTOR MATERIAL TYPE BASE UNIT OF
*MEASURE MATERIAL DESCRIPTION
*806 M FERT CM IRON
*807 M HALB KG STEEL
*808 M HAWA KG IRON
Award points if helpful.
Kiran Kumar.G.A -
DataServices 3.1 AIX/DB2 problem viewing table data.
This is a brand new DS 3.1 installation. After install, DI part works fine, jobs run, and we can view table data. At one point view table data became very slow, actually after a 30-second hour-glass show, an empty grey window shows up.
Hi Mahir,
the CID transform uses by default the Substitution Parameter [$$RefFilesAddressCleanse] to search for the necessary directory information.
You see this if you open the transform configuration and take a look at the options panel.
It sounds like on your installation you have the Data Services installed on your IBM AIX system and use the designer from the Windows based Client and during installation this Substitution parameter has been set to point to a local directory on you windows system instead to the server side installed directory (...\DataQuality\referencedata).
Can you check in your Substitution Parameter Editor (in DS Designer under Tools--> Substitution Parameters Configuration...) if all of your Substitution Parameters are set to the local machine?
Niels -
Hi,
I have a large table about 8 GB i need to add a new column to this table and update new column values of all the present records.
Please let me know any good methods for the same. while doing i same i also intend to partition the table.
Thanks in advance.Check this
SQL> CREATE TABLE tb1(c1 NUMBER);
Table created.
SQL> ALTER TABLE tb1 ADD CONSTRAINT tb1_pk PRIMARY KEY(c1);
Table altered.
SQL> INSERT INTO tb1 VALUES(1);
1 row created.
SQL> CREATE TABLE tb2(c1 NUMBER, c2 NUMBER);
Table created.
SQL> exec dbms_redefinition.can_redef_table(USER, 'TB1');
PL/SQL procedure successfully completed.
SQL> exec dbms_redefinition.start_redef_table(USER, 'TB1', 'TB2', 'C1 C1, 34 C2');
PL/SQL procedure successfully completed.
SQL> exec dbms_redefinition.finish_redef_table(USER, 'TB1', 'TB2')
PL/SQL procedure successfully completed.
SQL> SELECT * FROM tb1;
C1 C2
1 34
SQL> Lukasz -
Data not updating in table ,data transfered using DTW
Hi Everybody,
I had transfered data using DTW, it shows that data imported,but it not updated, that means it not shows in database.
So please so me any solution to this.
Regards,
SrinivasHi suda,
I am giving he detailes of the BusinessObject
BusinessObject =oUserLanguages
template=oUserLanguages.csv
i had copied the oUserLanguage.csv file and entered data into it and saved it(comma deliminated)
steps:
1.i had selected oUserlanguage object from list.
2.i had selected source file (oUserLanguage.csv )
3.the data properly matched and data is displayed when source tab is pressed. and ields are properly matched.
4.three check boxes are checked.
5.i had seen the message you are sucessfully specified required information for imporing data
6.in lost step it shows like below
Total: 2 business object(s)
2 business object(s) imported successfully
0 business object(s) not imported
0 business object(s) updated successfully
0 business object(s) not updated
7.in log files status shows succeeded
But I had cheked the languages , the data imported not shown.
Regards
srinivas -
Problem in item data updation in Opportunity Creation
Hi All,
I am able to create the opportunity with BAPI_OPPORTUNITY_CREATEMULTI but the item data ( product tab in the opportunity ) is blank.
Please see the code below which i am using for this item data population. Update is getting terminated if i am using header handle. Please send me the correct solution for this problem.
*set item data
clear ls_input_field.
ls_input_field-ref_handle = lc_handle_2.
ls_input_field-ref_kind = 'B'.
ls_input_field-objectname = 'ORDERADM_I'.
ls_input_field-fieldname = 'HANDLE'.
INSERT ls_input_field INTO TABLE lt_input_field.
ls_input_field-fieldname = 'HEADER_HANDLE'.
INSERT ls_input_field INTO TABLE lt_input_field.
ls_input_field-fieldname = 'LOGICAL_KEY'.
INSERT ls_input_field INTO TABLE lt_input_field.
ls_input_field-fieldname = 'ORDERED_PROD'.
INSERT ls_input_field INTO TABLE lt_input_field.
ls_input_field-fieldname = 'NUMBER_INT'.
INSERT ls_input_field INTO TABLE lt_input_field.
ls_input_field-fieldname = 'MODE'.
INSERT ls_input_field INTO TABLE lt_input_field.
lv_item = 0.
lv_number_int = 0.
ls_item-handle = lc_handle_2.
ls_item-header_handle = lc_handle_1.
ls_item-parent_handle = lc_handle_1.
if i_form_id = 'CAP'.
ls_item-ordered_prod = 'CAP_FEE'.
ls_item-number_int = lv_number_int + 10.
ls_item-mode = 'A'.
append ls_item to lt_item.
lv_number_int = ls_item-number_int.
clear ls_item.
*set schedule line
clear ls_input_field.
ls_input_field-ref_handle = lc_handle_2.
ls_input_field-objectname = 'SCHEDLIN'.
ls_input_field-ref_kind = 'B'.
ls_input_field-fieldname = 'ITEM_HANDLE'.
INSERT ls_input_field INTO TABLE lt_input_field.
ls_input_field-fieldname = 'HANDLE'.
INSERT ls_input_field INTO TABLE lt_input_field.
ls_input_field-fieldname = 'QUANTITY'.
INSERT ls_input_field INTO TABLE lt_input_field.
ls_scheduleline-item_handle = lc_handle_2.
ls_scheduleline-handle = lc_handle_1.
ls_scheduleline-quantity = 1.
append ls_scheduleline to lt_scheduleline.
endif.
- PrakashHi,
Use the below code to maintain line items, in FM 'CRM_ORDER_MAINTAIN'.
CREATION OF THE ITEM GUID
CLEAR v_item_ref_guid.
CALL FUNCTION 'GUID_CREATE'
IMPORTING
ev_guid_16 = v_item_ref_guid.
CREATION OF SCHEDULING LOGICAL GUID.
CLEAR v_sched_logical.
CALL FUNCTION 'GUID_CREATE'
IMPORTING
ev_guid_16 = v_sched_logical.
values for it_pricing
CLEAR wa_pricing.
CLEAR it_pricing.
wa_pricing-ref_handle = c_ref_handle2.
wa_pricing-ref_guid = v_item_ref_guid.
wa_pricing-ref_kind = c_b_kind.
INSERT wa_pricing INTO TABLE it_pricing.
values for product_i-UOM
CLEAR wa_product.
CLEAR wa_fieldname.
CLEAR it_fields.
wa_fieldname-fieldname = c_process_qty_unit_field.
INSERT wa_fieldname INTO TABLE it_fields.
CLEAR wa_input_field.
wa_input_field-ref_handle = c_ref_handle2.
wa_input_field-ref_guid = v_item_ref_guid.
wa_input_field-ref_kind = c_b_kind.
wa_input_field-objectname = c_product_i_input.
wa_input_field-field_names = it_fields.
INSERT wa_input_field INTO TABLE it_input_field.
CLEAR wa_product_i.
wa_product_i-ref_guid = v_item_ref_guid.
wa_product_i-ref_handle = c_ref_handle2.
wa_product_i-process_qty_unit = wa_product-process_qty_unit.
INSERT wa_product_i INTO TABLE it_product_i.
ENDIF.
values for service_i
CLEAR wa_input_field.
wa_input_field-ref_handle = c_ref_handle2.
wa_input_field-ref_guid = v_item_ref_guid.
wa_input_field-ref_kind = c_b_kind.
wa_input_field-objectname = c_service_i.
wa_input_field-field_names = it_fields.
INSERT wa_input_field INTO TABLE it_input_field.
CLEAR wa_service_i.
wa_service_i-ref_guid = v_item_ref_guid.
wa_service_i-ref_handle = c_ref_handle2.
INSERT wa_service_i INTO TABLE it_service_i.
fieldnames for quantity
CLEAR wa_schedul.
READ TABLE it_schedul INTO wa_schedul INDEX 1.
IF sy-subrc = 0.
CLEAR wa_fieldname.
CLEAR it_fields.
wa_fieldname-fieldname = c_logical_key.
INSERT wa_fieldname INTO TABLE it_fields.
CLEAR wa_fieldname.
wa_fieldname-fieldname = c_quantity.
INSERT wa_fieldname INTO TABLE it_fields.
CLEAR wa_input_field.
wa_input_field-ref_handle = c_ref_handle2.
wa_input_field-ref_guid = v_item_ref_guid.
wa_input_field-ref_kind = c_b_kind.
wa_input_field-objectname = c_schedlin_input.
wa_input_field-logical_key = c_log_key_item.
wa_input_field-field_names = it_fields.
INSERT wa_input_field INTO TABLE it_input_field.
CLEAR wa_quantity.
CLEAR it_quantity.
wa_quantity-guid = v_sched_logical.
wa_quantity-item_guid = v_item_ref_guid.
wa_quantity-quantity = wa_schedul-quantity.
wa_quantity-logical_key = c_log_key_item.
wa_quantity-handle = c_ref_handle0.
INSERT wa_quantity INTO TABLE it_quantity.
valus for quantity
CLEAR wa_schedulin.
wa_schedulin-ref_guid = v_item_ref_guid.
wa_schedulin-ref_handle = c_ref_handle2.
wa_schedulin-schedlines = it_quantity.
INSERT wa_schedulin INTO TABLE it_schedulin.
ENDIF.
fieldnames for product
CLEAR wa_orderadm.
READ TABLE it_orderadm INTO wa_orderadm INDEX 1.
IF sy-subrc = 0.
CLEAR wa_fieldname.
CLEAR it_fields.
wa_fieldname-fieldname = c_itm_proc_ident.
INSERT wa_fieldname INTO TABLE it_fields.
CLEAR wa_fieldname.
wa_fieldname-fieldname = c_mode_input.
INSERT wa_fieldname INTO TABLE it_fields.
CLEAR wa_fieldname.
wa_fieldname-fieldname = c_ordered_prod.
INSERT wa_fieldname INTO TABLE it_fields.
CLEAR wa_fieldname.
wa_fieldname-fieldname = c_number_int.
INSERT wa_fieldname INTO TABLE it_fields.
CLEAR wa_fieldname.
wa_fieldname-fieldname = c_prog_id.
INSERT wa_fieldname INTO TABLE it_fields.
CLEAR wa_input_field.
wa_input_field-ref_handle = c_ref_handle2.
wa_input_field-ref_guid = v_item_ref_guid.
wa_input_field-objectname = c_orderadm_i_input.
wa_input_field-field_names = it_fields.
INSERT wa_input_field INTO TABLE it_input_field.
values for product
CLEAR wa_orderprp_i.
CLEAR v_itemno.
v_itemno = v_itemno + v_line_incr.
wa_orderprp_i-guid = v_item_ref_guid.
wa_orderprp_i-header = v_head_ref_guid.
wa_orderprp_i-number_int = v_itemno.
wa_orderprp_i-ordered_prod = wa_orderadm-ordered_prod.
wa_orderprp_i-description = wa_orderadm-description.
wa_orderprp_i-handle = c_ref_handle2.
wa_orderprp_i-number_int = wa_orderadm-number_int .
wa_orderprp_i-zzprogram_id = wa_orderadm-zzprogram_id.
INSERT wa_orderprp_i INTO TABLE it_orderprp_i.
ENDIF -
External Table to Internal table Data update query
Hi all ,
I have Follwoing 2 tables one is external oracle and 2nd is internal and both table have the same data as following this is sample data while actual table contains millions of record.
External Table name SE2_EXT
GL_REF_NO GL_CUST_ID GL_TRAN_AMT_LCY GL_REVERSAL_MARKER GL_GL_ID GL_LOCAL
1 5 513557 100 136340003678088.020001
2 5 513557 -100 R 136340003678088.020002
3 1 26 -685.12 136340003674772.030001
4 1 26 685.12 R 136340003674772.030002
5 4 500539 100 136340003477900.000001
6 4 500539 -100 R 136340003477900.000002
7 23 604612 182.15 136340003578165.170001
8 23 604612 -182.15 R 136340003578165.170002
9 76 232033 -230.7 136340003576922.100001
10 76 232033 235.7 R 136340003576957.010001 I want to update GL_LOCAL column with 'R' with conditions that if
WHERE GL2.GL_GL_ID=GL2_EXT.GL_GL_ID
AND GL2.GL_REF_NO=GL2_EXT.GL_REF_NO
AND GL2.GL_CUST_ID=GL2_EXT.GL_CUST_ID
AND GL2.GL_REVERSAL_MARKER IN ('R',NULL)
AND GL2.GL_TRAN_AMT_LCY=GL2_EXT.GL_TRAN_AMT_LCYbut the tricky thing is GL_TRAN_AMT is one time - (minus) and one time +(plus). I only want to update those record who have same TRAN_AMT_LCY with same other condition mentioned above.
I tried merj statement but it did'nt work.If any body help me i would be appriciated.
MERGE INTO SE2 A
USING ( SELECT GL_REF_NO,GL_CUST_ID,GL_TRAN_AMT_LCY,GL_REVERSAL_MARKER,GL_GL_ID FROM GL2_EXT) B
ON (A.GL_GL_ID=B.GL_GL_ID AND A.GL_CUST_ID=B.GL_CUST_ID)
WHEN MATCHED THEN
UPDATE
SET A.GL_LOCAL_A1=B.SE_LOCALWhy is it tricky? You did not say.
Making a guess as to the problem why not use TO_NUMBER to cast the string? -
Item Master Data Update using DTW
hello all,
i want to update my Item Master Data using DTW, and i am experiencing a problem, when i use a comma delimeted ex. this line
BEARING, BALL, # 307, DTW will put it in a different field, while if i will use a text tab delimeted on the same line the result will be "BEARING, BALL, # 307" and i cant acheive what i want. this is the exact description i want
Original Data :BEARING, BALL # 307
Using Comma Delimeted :BEARING next field(BALL # 307)
Using Tab Delimeted :"BEARING, BALL, # 307"
Desired item Description :BEARING, BALL, # 307
Please guide
thanks,
FidelHai!
Check this note
[631504|https://websmp130.sap-ag.de/sap(bD1lbiZjPTAwMQ==)/bc/bsp/spn/smb_searchnotes/display.htm?note_langu=E¬e_numm=0000631504]
Why so is, we don't knw the DB structure. I won't be a updation of single Field or Table it may have link's. -
Hello,
I'm trying to encrypt dates in a DATE type field. If I perform a select, it encrypts the field:
select dob,dbms_obfuscation_toolkit.md5( input_string => dob ),
from person where person_id = 138;
However, when I try and perform the update, it throws ORA-01858: a non-numeric character was found where a numeric was expected:
update person
set dob = dbms_obfuscation_toolkit.md5( input_string => dob )
where person_id = 138;
I also tried, but neither of these worked:
set dob = dbms_obfuscation_toolkit.md5( input_string => to_char(dob,'DD-MON-YY') )
set dob = dbms_obfuscation_toolkit.md5( input_string =>to_date( to_char(dob,'DD-MON-YY'),'DD-MON-YY') )
Thanks,
JohnI'm trying to encrypt dates in a DATE type field.
YOU can't do that. Only Oracle can do that.
Anything that you encrypt will have to be stored in a datatype that supports the characters your data might have. That will typically be a BLOB.
See the Advanced Security doc
http://docs.oracle.com/cd/B28359_01/network.111/b28530/asotrans.htm
3 Securing Stored Data Using Transparent Data Encryption
Transparent data encryption enables you to encrypt sensitive data, such as credit card numbers, stored in table columns. Encrypted data is transparently decrypted for a database user who has access to the data. Transparent data encryption helps protect data stored on media in the event that the storage media or data file gets stolen.
3.1.3 How Transparent Data Encryption Works
Transparent data encryption is a key-based access control system. Even if the encrypted data is retrieved, it cannot be understood until authorized decryption occurs, which is automatic for users authorized to access the table.
When a table contains encrypted columns, a single key is used regardless of the number of encrypted columns. This key is called the column encryption key. The column encryption keys for all tables, containing encrypted columns, are encrypted with the database server master encryption key and stored in a dictionary table in the database. No keys are stored in the clear.
As shown in Figure 3-1, the master encryption key is stored in an external security module that is outside the database and accessible only to the security administrator. For this external security module, Oracle uses an Oracle wallet as described in this chapter. Storing the master encryption key in this way prevents its unauthorized use. -
Problem in implementing ODATA update using SAP UI5
Hi,
I am trying to develop an hwc mobile app [hwc] using sapui5 and phonegap. I am trying to perform odata crud operations in the app.
In the netweaver side, currently we have disabled the setting for X-CSRF token so that CUD operations are possible even without CSRF token. I am using datajs library for consumption of the odata services in my app. My read operation is successful and i am able to display the data in my app. But I am facing problems in the update operation.
In order to ensure that serverside is perfect, I used the WFetch tool to perform the update operation and verified that data got updated successfully in SAP backend { i got 204 response from server ]. In the wfetch tool, the headers and body section was like this
x-requested-with: XMLHttpRequest\r\n
\r\n
<?xml version="1.0" encoding="utf-8" standalone="yes"?>\r\n
<entry xmlns:d="http://schemas.microsoft.com/ado/2007/08/dataservices" xmlns:m="http://schemas.microsoft.com/ado/2007/08/dataservices/metadata" xmlns="http://www.w3.org/2005/Atom">\r\n
<content type="application/xml">\r\n
<m:properties>\r\n
<d:value>0203_IN120</d:value> \r\n
<d:scheme_id>Z_BANK_RFC_GANESH</d:scheme_id> \r\n
<d:scheme_agency_id>LOCAL</d:scheme_agency_id> \r\n
<d:post_bank /> \r\n
<d:bank_branch>BANASWADI</d:bank_branch> \r\n
<d:street>123 MARUTHI SEVA NAGAR.</d:street> \r\n
<d:city>BANGALORE</d:city> \r\n
<d:swift_code/>\r\n
<d:region>KA</d:region> \r\n
<d:bank_name>HSBC</d:bank_name> \r\n
<d:pobk_curac /> \r\n
<d:bank_group /> \r\n
<d:addr_no /> \r\n
</m:properties>\r\n
</content>\r\n
</entry>\r\n
The response i got was like this
WWWConnect::Connect("XXXXX.XXXX.com","8000")\nIP = "10.6.13.146:8000"\nsource port: 50054\r\n
REQUEST: **************\nPUT /sap/opu/sdata/sap/ZBANKRFCGANESH/z_bank_rfc_ganeshCollection(value='0203_IN120',scheme_id='Z_BANK_RFC_GANESH',scheme_agency_id='LOCAL')/?$format=xml HTTP/1.1\r\n
x-requested-with: XMLHttpRequest\r\n
Host: i3lbwvids.itcinfotech.com\r\n
Accept: */*\r\n
Content-Length:884\r\n
Authorization: Basic Z2FuZXNoOmxvZ2luQDEyMzQ=\r\n
\r\n
<?xml version="1.0" encoding="utf-8" standalone="yes"?>\r\n
<entry xmlns:d="http://schemas.microsoft.com/ado/2007/08/dataservices" xmlns:m="http://schemas.microsoft.com/ado/2007/08/dataservices/metadata" xmlns="http://www.w3.org/2005/Atom">\r\n
<content type="application/xml">\r\n
<m:properties>\r\n
<d:value>0203_IN120</d:value> \r\n
<d:scheme_id>Z_BANK_RFC_GANESH</d:scheme_id> \r\n
<d:scheme_agency_id>LOCAL</d:scheme_agency_id> \r\n
<d:post_bank /> \r\n
<d:bank_branch>BANASWADI</d:bank_branch> \r\n
<d:street>123 MARUTHI SEVA NAGAR.</d:street> \r\n
<d:city>BANGALORE</d:city> \r\n
<d:swift_code/>\r\n
<d:region>KA</d:region> \r\n
<d:bank_name>HSBC</d:bank_name> \r\n
<d:pobk_curac /> \r\n
<d:bank_group /> \r\n
<d:addr_no /> \r\n
</m:properties>\r\n
</content>\r\n
</entry>\r\n
RESPONSE: **************\nHTTP/1.1 204 No Content\r\n
set-cookie: MYSAPSSO2=AjQxMDMBABhHAEEATgBFAFMASAAgACAAIAAgACAAIAACAAY4ADAAMAADABBJAEQAUwAgACAAIAAgACAABAAYMgAwADEANAAwADEAMgA5ADAANwAyADUABQAEAAAACAYAAlgACQACRQD%2fAPowgfcGCSqGSIb3DQEHAqCB6TCB5gIBATELMAkGBSsOAwIaBQAwCwYJKoZIhvcNAQcBMYHGMIHDAgEBMBkwDjEMMAoGA1UEAxMDSURTAgcgEQQGCClRMAkGBSsOAwIaBQCgXTAYBgkqhkiG9w0BCQMxCwYJKoZIhvcNAQcBMBwGCSqGSIb3DQEJBTEPFw0xNDAxMjkwNzI1MzlaMCMGCSqGSIb3DQEJBDEWBBRF%2fqnZ6znAGOYDuA1QJxZ7kOYTfDAJBgcqhkjOOAQDBC4wLAIUNk9rqGV16RPsLrLsHfHtNPc%21Q44CFBRiJ4BhRrmxUVH77EYIGSSd8WPb; path=/; domain=.itcinfotech.com\r\n
content-length: 0\r\n
dataserviceversion: 2.0\r\n
x-sap-odata-extension-version: 0.9;gp=0.8\r\n
server: SAP NetWeaver Application Server / ABAP 702\r\n
\r\n
Now i tried to do that using sapui5 code.
OData.request(
requestUri: "http://XXXXX.XXXXX.com:8000/sap/opu/sdata/sap/ZBANKRFCGANESH/z_bank_rfc_ganeshCollection(value='0203_IN120',scheme_id='Z_BANK_RFC_GANESH',scheme_agency_id='LOCAL')/?$format=xml",
method: "PUT",
headers: { "X-Requested-With": "XMLHttpRequest", "sap-user" : "ganesh", "sap-password" : "login@1234", "Content-Type": "application/atom+xml" },
data: {
"value" : "0203_IN120",
"scheme_id" : "Z_BANK_RFC_GANESH",
"scheme_agency_id" : "LOCAL",
"post_bank" : "",
"bank_branch" : "Park Street",
"street" : "Russel Street",
"city" : "KOLKATA",
"swift_code" : "",
"region" : "WB",
"bank_name" : "HSBC",
"pobk_curac" : "",
"bank_group" : "",
"addr_no" : ""
function (data, response){
// var header_xcsrf_token = response.headers['x-csrf-token'];
// alert(header_xcsrf_token);
// alert("hello");
//alert(data);
alert(JSON.stringify(response, null, 4));
function (err) {
alert(err.message);
I found the I am always getting a 200 OK in the respose and not 204 [ when i displayed the response using the alert message]. As expected data is also not getting updated.
Kindly guide me where i am going wrong in the code. Please help me out.
thanks and regards,
krishna.Hi Krishna
I will try and help.
The first thing i notice is you are using OData.request, this is not part of SAPUI5, OData is a global introduced by the datajs thirdparty plugin, I would recommend not using it directly, instead use the ODataModel API start by reading the Class sap.ui.model.odata.ODataModel and ODataModel. There are a lot of good of reasons for using the ODataModel, like databinding, event handling, it doesn't smell like a leak, besides the SAPUI5 ODataModel is a lot easier to use.
try something like this
var url = 'http://XXXXX.XXXXX.com:8000/sap/opu/sdata/sap/ZBANKRFCGANESH';
var bJSON = true; //use JSON
var sUser = 'ganesh';
var sPassword = 'login@1234';
// create a model for OData service call
var oModel = new sap.ui.model.odata.ODataModel(url, true, sUser, sPassword);
sap.ui.getCore().setModel(oModel);
var path = '/z_bank_rfc_ganeshCollection(value='0203_IN120',scheme_id='Z_BANK_RFC_GANESH',scheme_agency_id='LOCAL')';
// create the data
var data = {
"value": "0203_IN120",
"scheme_id": "Z_BANK_RFC_GANESH",
"scheme_agency_id": "LOCAL",
"post_bank": "",
"bank_branch": "Park Street",
"street": "Russel Street",
"city": "KOLKATA",
"swift_code": "",
"region": "WB",
"bank_name": "HSBC",
"pobk_curac": "",
"bank_group": "",
"addr_no": ""
// get a CSRF token if needed
oModel.refreshSecurityToken();
// add own callback code
var oParams, fnSuccess, fnError, bUseMERGE;
//PUT data back to server
oModel.update(path, data, oParams, fnSuccess, fnError, bUseMERGE);
Let us know how you get on
hth
jsp
Message was edited by: John Patterson
I really dislike the SCN editor, especially the way it re formats code so it cannot be read while writing -
Asking for transport request whie table data updation
Hi All,
I am trying to update a table TCJ04 using transaction OPS6. When ever I am adding a new entry or edit the existing entry and click SAVE, the table is asking for Transport request number.
This table carries a master data and should not be asking for transport request. Rather its access has to be controlled by user authorisation.
Please tell me as to what is the reason of asking for transport request.
regards,
Gaurav.Hi Gourav,
If you go table maintanance generater of the table TCJ04 in SE11, you will find that Standard recording routine radio button is selected. That is the reason you are asked to provide transport request while updating data. -
Asking for transport request while table data updation
Hi All,
I am trying to update a table TCJ04 using transaction OPS6. When ever I am adding a new entry or edit the existing entry and click SAVE, the table is asking for Transport request number.
This table carries a master data and should not be asking for transport request. Rather its access has to be controlled by user authorisation.
Please tell me as to what is the reason of asking for transport request.
regards,
Gaurav.Hi There,
It is asking for the transport request for each new entry in the table since the Delivery class in the attributes is set to C( Customizing table, maintenance only by cust., not SAP import ), If it is set to "A" it will not ask for the transport request..
Try creating a custom table and play around with the Delivery class, A and C, you will come to know the difference.
Let me know if you need further help in this regard.
don't 4get to rward pionts if found helpful.
Thanks- -
How to read internal table data and use to retrive from other table.
Hi all,
I am trying to generate a report using ooabap.
In this scenario, I retrieved data from one standard table (zcust) and successfully displayed using structure 'i_zcust_final' ( i_zcust_final is similar structure of zcust).
Now I want to get some other data from other standard table (zpurch) using the data in i_zcust_final. How....???? I am unable to read data from i_zcust_final even i kept in loop.
I am attaching the code here.. even it too long, please look at the code and suggest me what to do.
code **************************
REPORT ZBAT_OOPS_REPORT1.
TABLES: ZCUST.
D E F I N I T I O N *****
CLASS BATLANKI_CLS DEFINITION.
PUBLIC SECTION.
DATA : ITAB_ZCUST TYPE STANDARD TABLE OF ZCUST,
I_ZCUST_FINAL LIKE LINE OF ITAB_ZCUST,
ITAB_ZCUST1 TYPE STANDARD TABLE OF ZCUST.
TYPES: BEGIN OF IT_ZPURCH,
CUSTNUM TYPE ZPURCH-CUSTNUM,
PURC_DOC TYPE ZPURCH-PURC_DOC,
VENDOR TYPE ZPURCH-VENDOR,
STATUS TYPE ZPURCH-STATUS,
PURC_ORG TYPE ZPURCH-PURC_ORG,
END OF IT_ZPURCH.
DATA : ITAB_ZPURCH TYPE TABLE OF IT_ZPURCH,
I_ZPURCH_FINAL LIKE LINE OF ITAB_ZPURCH.
METHODS: GET_ZCUST,
PRINT_ZCUST,
GET_ZPURCH.
ENDCLASS.
I N I T I A L I Z T I O N *****
SELECT-OPTIONS:S_CUSNUM FOR ZCUST-CUSTNUM.
INITIALIZATION.
S_CUSNUM-LOW = '0100'.
S_CUSNUM-HIGH = '9999'.
S_CUSNUM-OPTION = 'BT'.
S_CUSNUM-SIGN = 'I'.
APPEND S_CUSNUM.
CLEAR S_CUSNUM.
I M P L E M E N T A T I O N *****
CLASS BATLANKI_CLS IMPLEMENTATION.
METHOD GET_ZCUST.
SELECT * FROM ZCUST
INTO TABLE ITAB_ZCUST
WHERE CUSTNUM IN S_CUSNUM.
ENDMETHOD.
METHOD PRINT_ZCUST.
LOOP AT ITAB_ZCUST INTO I_ZCUST_FINAL.
WRITE:/ I_ZCUST_FINAL-CUSTNUM,
I_ZCUST_FINAL-CUSTNAME,
I_ZCUST_FINAL-CITY,
I_ZCUST_FINAL-EMAIL.
ENDLOOP.
ENDMETHOD.
METHOD GET_ZPURCH.
LOOP AT ITAB_ZCUST INTO ITAB_ZCUST1.
SELECT CUSTNUM
PURC_DOC
VENDOR
STATUS
PURC_ORG
FROM ZPURCH
INTO CORRESPONDING FIELDS OF TABLE ITAB_ZPURCH
WHERE CUSTNUM EQ I_ZCUST_FINAL-CUSTNUM.
ENDLOOP.
LOOP AT ITAB_ZPURCH INTO I_ZPURCH_FINAL.
WRITE:/ I_ZPURCH_FINAL-CUSTNUM,
I_ZPURCH_FINAL-PURC_DOC,
I_ZPURCH_FINAL-VENDOR,
I_ZPURCH_FINAL-STATUS,
I_ZPURCH_FINAL-PURC_ORG.
ENDLOOP.
ENDMETHOD.
ENDCLASS.
O B J E C T *****
DATA: BATLANKI_OBJ TYPE REF TO BATLANKI_CLS.
START-OF-SELECTION.
CREATE OBJECT BATLANKI_OBJ.
CALL METHOD:
BATLANKI_OBJ->GET_ZCUST,
BATLANKI_OBJ->PRINT_ZCUST,
BATLANKI_OBJ->GET_ZPURCH.
Can anyone suggest me..
Thanks in advance,
Surender.Hi Surendar..
There is mistake in the Work area specification in this method.
METHOD GET_ZPURCH.
LOOP AT ITAB_ZCUST INTO ITAB_ZCUST1.
SELECT CUSTNUM
PURC_DOC
VENDOR
STATUS
PURC_ORG
FROM ZPURCH
INTO CORRESPONDING FIELDS OF TABLE ITAB_ZPURCH
<b>WHERE CUSTNUM EQ ITAB_ZCUST1-CUSTNUM.</b>
"Instead of I_ZCUST_FINAL-CUSTNUM.
ENDLOOP.
LOOP AT ITAB_ZPURCH INTO I_ZPURCH_FINAL.
WRITE:/ I_ZPURCH_FINAL-CUSTNUM,
I_ZPURCH_FINAL-PURC_DOC,
I_ZPURCH_FINAL-VENDOR,
I_ZPURCH_FINAL-STATUS,
I_ZPURCH_FINAL-PURC_ORG.
ENDLOOP.
ENDMETHOD.
Now it should work..
One more thing : From performance point of view you have to Replace that loop using FOR ALL ENTRIES . And avoid CORRESPONDING FIELDS. it will be slow.
This is the code.
LOOP AT ITAB_ZCUST INTO ITAB_ZCUST1.
if ITAB_ZCUST[] IS NOT INITIAL.
SELECT CUSTNUM
PURC_DOC
VENDOR
STATUS
PURC_ORG
FROM ZPURCH
INTO TABLE ITAB_ZPURCH
<b>for all entries in ITAB_ZCUST1</b>
<b>WHERE CUSTNUM EQ ITAB_ZCUST1-CUSTNUM.</b>
"Instead of I_ZCUST_FINAL-CUSTNUM.
ENDIF.
ENDLOOP.
<b>Reward if Helpful.</b>
Maybe you are looking for
-
Can not see the songs in the ipod
when i load the songs in my computer i see all the songs in the ipod but if i want to see them in another computer can not see any of them...is there any option i'm missing??? thank you!!!
-
Solution Manager 3.2 upgrade to version 7.0
Hello All, I am in the Solution Manager 3.2 upgrade to version 7.0. In phase IS_SELECT "Upgrade Assistant" asks to add a few files update components (Attachment: screens). Two of them (ST-SER and CPRXRPM) I managed to find and read. However, in the S
-
Hi, I'm looking for a way to get date/time formatted to UTC time out of the database: When selecting SYSDATE, I got "local time", but what I really want is the UTC time instead. Could anyone help me with that? TIA! eva
-
How to get consolidated last financial year(1-July-2011 onwards) Tablesize
Hi All, My database contain 120 tables. Could you please suggest me the consolidated last financial year (1-July-2011 onwards) data size for 120 tables shared before? How to get this/Is this possible Please advice. I used below query, but date wise..
-
Making classes talk to each other, getting my head around object-oriented
How many questions can I ask before people get annoyed? Hope I'm not asking too many. This is probably a dumb question, but trying to do this whole object-oriented thing is making my head spin. I want my program to make something happen in Panel 2 wh