Virtual provider cube ABAP Code to read the Characteristics
Hello Friends. We have a virtual provider cube that is connected to the basic real cube for the GL. We want to populate three Characteristics in the virtual provider which are Material Codes, Code1 Code2 Code3 which change very frequently, every alternate day in ECC.
I want to write the Code in Func Module of Virtual Prov Infocube
that read the Mapping DSO for the Values of Material Codes, Code1 Code2 Code3 and Populate it in the Virtual Cube at RUNTIME of the execution of the Query built on the virtual provider.
If you have implemented this functionality can you pls. provide the step by step details.
Thanks
Soniya
Hi,
I have used ABAP for hierarchy but it is in BPS. I have used some of the CLASS given by SAP.
For your requirement, you can use the CLASS CL_RSR_HIERARCHY
Rgds,
Shailesh
Similar Messages
-
WebDynpro Abap code to read IView Name
Hi Friends,
Could you please give me Webdynpro abap code to read the name of the Iview.
Regards,
Lakshmi Prasad.Hello Lakshmi,
I dont think this is possible. If you want to differentiate from which iView your web dynpro application is launched, then you can pass some constant as Application Parameter in the iView. and in the web dynpro application you can read this parameter and perform your required logic.
For example suppose say your web dynpro application is hosted in iView1 and iView2. In both the iview properties, pass a parameter (say IVIEWNAMe) with values 'iView1' and iView2 respectively.
then in the Webdynpro -> Window Controllers' -> default event handler method, you read the parameter IVIEWNAME and based on the value you can peform your logic.
BR, Saravanan -
ABAP Code to Read Characteristic from Another DSO
Gurus and Experts,
Plain and simple, I need a piece of ABAP code that reads a characteristic value from a different DSO.
Here is the story. I have a data flow from DSO Delivery1 to DSO Delivery2. I need to write a code in the start routine of the transformation to read Sales_Doc_Type from DSO Sales1. The condition is, if Delivery1-Ref_Doc_Nr = Sales1-Sales_Nr then Delivery1-Sales_Doc_Type = Sales1_Sales_Doc_Type.
I am a beginner in SAP BI and know nothing about ABAP. But I do have experience in SQL and Java.
Any help or links or direction will be appriciated. Thanks in advance.
HerruHello,
I think there is a correction in your Ques. That there are two DSO Delivery1 and Sales1...... I Hope this is Ok.
Tables Required:---- Go To SE11 and *<DSO_NAME>00 You will get active table for your DSO. EG. /bic/Delivary100 and /bic/sales100
Logic In start Riutine:----
1. Define structure in Global Def. for Sales1 DSO.
2. Also Define Internal table in Global Def. (I hope you know the syntax)
3. now you will find that start writing code from below.
Inclue:------ Select Statement from Slaes1 DSO into itab for all entries in source package.
4. Loop source_package assigning <result_fields>.
read itab into wa where Sales1-Sales_Nr = <result_fields>-Ref_Doc_Nr.
<result_fields>-Sales_Doc_Type = wa-Sales1_Sales_Doc_Type.
endloop.
This logic will work..........
If still you are find it difficult then take some abaper help.
Regards,
Ankit. -
Sensirion EKP-3 Code to read the raw ticks from the SDP6xx Pressure Transducer with LabVIEW
Guys:
I have seen the post here about the Temp Humidity sensor: Ref: http://forums.ni.com/t5/forums/replypage/board-id/170/message-id/749141
Pardon the post under a new topic but I was advised to post it in a "new thread"... With the Device name in the title.. If this is a no-no let me know...
Here is a question for the EKP-3 using the USB for the SDP6xx Here is an overview of what I am looking for...
http://www.screencast.com/t/RUDOisSvqC
I have the Sensirion EK-P3 Stick to talk to the pressure transducer..
This stick is made by these guys: http://www.codemercs.com/349/
My question is how did you figure out the binary code to read the T and RH from the iowkit.dll
I want to read the RAW TICKS from the device that represent pressure. They go from 0 - 65535 and I have spied on it with WireShark and can not wrangle the binary code to read the raw ticks I am after.
I made a video you can look at to see what I want from my learnings from this post:
http://www.screencast.com/t/UnCTJtvWLe
I attached the DLL as well (Just rename it to iowkit.dll because LabVIEW does nol like dll's in attachments... so you do not have to mess with the msi.
You may contact me directly at [email protected]
Thanks!
Dave Korpi
Ref: http://forums.ni.com/t5/forums/replypage/board-id/170/message-id/749141
Attachments:
SHT75_IOWarrior.llb 139 KB
iowkitdll.txt 71 KBCameron... Wondering if you knnow how to get a 2's compliment for a 12 bit value in LabVIEW?
I am looking to get the code to communicate to this top secret Sensirion product.
Anyone know if I am properly sending the commands at 1, 2 and 3 of the image below?
At issue, I think, is getting the two's compliment of the two 8 bit registers at Data LSB and Data MSB using LabVIEW...
I have been working with the wizards at http://www.codemercs.com/258/?L=1 who have been EXTREMELY helpful.
They have an AWESOME I2C to USB converter that you can get OEM devices to work for your I2C project. It is a single channel version of the NI-8451
Anyone out there can figure this out so I can read the RAW TICKS from the Sensirion SDP6xx product line?
Thanks a million!
Feel free to contact me at 831-455-0418 (pacific time) or [email protected]
Attachments:
SensirionCalls.png 121 KB
Sensirion_Differential_Pressure_SDP6x0_Sample_Code_V1.pdf 97 KB
LabVIEW_IOWarrior_V150Second.zip 1403 KB -
How to write java code to read the pixel color in some place of screen?
Hello all:
How to write java code to read the pixel color in some place of screen?
The java application iteself doesn't have any GUI.
thank you
-DanelSee java.awt.Robot
-
Read the characteristics of a planned order in APO
how can we read the characteristics of a planned order in APO.What Function Module can be used for this?
how can we manually schedule the order activities based on the characteristics. Can we use the function module
/SAPAPO/OM_ACT_SCHEDULE by copying and making some changes in it for this purpose?Hi,
if there are any orders in your system with characteristics (in planning version 000) then this report will find them:
report get_char.
data:
ls_genp type /sapapo/om_gen_params,
lt_orderid type /sapapo/om_orderid_tab,
lt_char type /sapapo/om_charact_val_tab.
ls_genp-simversion = '000'.
call function '/SAPAPO/OM_ORDER_GET_ALL'
exporting
is_gen_params = ls_genp
iv_simsession = ''
importing
et_orders = lt_orderid.
call function '/SAPAPO/OM_ORDER_GET_DATA'
exporting
is_gen_params = ls_genp
iv_simsession = ''
it_order = lt_orderid
importing
et_charact_val_acts = lt_char.
Best regards
Thomas -
Need help in ABAP code to Enhance the Extract Structure ?????
Hi all,
I want to enhance the extract structure to get KBETR & KBRUE fields of KONP table since it didnt allow me to add those fields while creating the generic extractor because of currency key problems. I want to read all KONP records into internal table with KNUMH (Key). Next, I want to fill them into ZZKBETR & ZZKBRUE of Extract Structure ZOXUR40065 in loop.
DATA:
i_t_zrebate like ZOXUR40065 occurs 0 with header line,
reb_tabix like sy-tabix.
TABLES: KONP.
Could you please help me in completing the ABAP code?
Thanks,
Venkat.Hello Manga,
I have included the following code in ZXRSAU01:
WHEN 'ZREBATE'.
PERFORM ZREBATE_EXIT TABLES C_T_DATA.
After Double click on ZREBATE_EXIT on perform statement, it created ZXRSAF01 include and the following code is added in it:
FORM ZREBATE_EXIT TABLES FP_C_T_DATA STRUCTURE ZOXUR40065.
DATA:
i_t_zrebate like ZOXUR40065 occurs 0 with header line,
reb_tabix like sy-tabix.
FIELD-SYMBOLS: <l_c_t_data> TYPE ZOXUR40065.
LOOP AT fp_c_t_data ASSIGNING <l_c_t_data>.
reb_tabix = sy-tabix.
select single KBETR KBRUE
into (<l_c_t_data>-ZZKBETR,
<l_c_t_data>-ZZKBRUE,
from KONP
where KNUMH eq <l_c_t_data>-KNUMH.
if sy-subrc eq 0.
MODIFY fp_c_t_data FROM <l_c_t_data> INDEX reb_tabix.
endif.
CLEAR:reb_tabix.
ENDLOOP.
ENDFORM.
When I tried to Activate this ZXRSAF01 include, it fails with 'The FORM "ZREBATE_EXIT" does not exist'.
Should it be FP_C_T or P_C_T? I found P_C_T in ZXRSAF01 include.
What is wrong with it, please ?
Can't I add this whole code in main include ZXRSAU01itself?
The Extractor ZREBATE is based on KONA, KONH & KONP tables. This Extractor and KONA table have the same 4000 records and KONP has 13000 records. I want to extract KBERT & KBRUE from KONP.
Thanks in advance.
Regards,
Venkat -
Executing Abap Queries in Abap Code and processing the result
Hi,
I want to execute ABAP Queries (designed by sq01) in an abap report and processing the result in an internal table.
How could it be work?
Thanks a lot for your responses,
with kind Regards
Reinhold StroblHello,
GO to SQ01 and select your query. Go to Menu QUERY-->More Functions->Display Report Name.
You can then take that report name and go to SE38. Copy the code before END-OF_SELECTION and then modify as per your own requirements.
Regrads
Saket Sharma -
ABAP Code for Backup the entire table data in the application server
Hello Friends,
I have to create the table data Backup and Store the entire table data in the application server and also be able to restore the data back if needed.
this should be dynamic program for any table based on the table name given on the application server.. I have developed a program for this but its having problems with the Quantity, amount. Its not writing it correctly at the application level.
ANy Suggestions on this.
Below is the program for this.
Thanks,
Ster.
* Report YWMM_TABLE_DUMP *
REPORT ywmm_table_dump .
TABLES :
dd03l.
* Type spool declaration
TYPE-POOLS:
abap, slis.
DATA: i_table_data1 TYPE REF TO data.
DATA : it_dd03l LIKE dd03l OCCURS 0 WITH HEADER LINE.
*DATA : gt_fieldcat TYPE lvc_s_fcat.
DATA : i_fcat TYPE STANDARD TABLE OF lvc_s_fcat,
l_dr_line TYPE REF TO data,
l_v_as4vers TYPE as4vers.
FIELD-SYMBOLS: <f_table_data1> TYPE STANDARD TABLE,
<f_wa_table_data1> TYPE ANY.
SELECTION-SCREEN: BEGIN OF BLOCK bl1 WITH FRAME TITLE text-001.
PARAMETERS: rb_copy RADIOBUTTON GROUP map DEFAULT 'X',
rb_rest RADIOBUTTON GROUP map.
SELECTION-SCREEN: END OF BLOCK bl1.
SELECTION-SCREEN: BEGIN OF BLOCK bl2 WITH FRAME TITLE text-002.
PARAMETERS: p_table TYPE tabname OBLIGATORY,
p_plfld TYPE dd03l-fieldname.
SELECTION-SCREEN SKIP 1.
PARAMETERS: p_bkfile TYPE localfile OBLIGATORY.
SELECTION-SCREEN: END OF BLOCK bl2.
PERFORM get_data.
IF rb_copy = 'X'.
PERFORM backup.
ELSEIF rb_rest = 'X'.
PERFORM database_update.
ENDIF.
*& Form get_data
FORM get_data.
CLEAR i_fcat.
REFRESH i_fcat.
CALL FUNCTION 'LVC_FIELDCATALOG_MERGE'
EXPORTING
i_structure_name = p_table " Table Name
CHANGING
ct_fieldcat = i_fcat
EXCEPTIONS
OTHERS = 1.
CALL METHOD cl_alv_table_create=>create_dynamic_table
EXPORTING
it_fieldcatalog = i_fcat
IMPORTING
ep_table = i_table_data1.
IF sy-subrc = 0.
ASSIGN i_table_data1->* TO <f_table_data1>.
ELSE.
WRITE: 'Error creating internal table'.
ENDIF.
IF rb_copy = 'X'.
SELECT * FROM (p_table) INTO CORRESPONDING FIELDS OF
TABLE <f_table_data1> UP TO 20 ROWS.
ELSEIF rb_rest = 'X'.
CREATE DATA l_dr_line LIKE LINE OF <f_table_data1>.
ASSIGN l_dr_line->* TO <f_wa_table_data1>.
*Get Data from Application Server
* Opening the dataset P_BKFILE given in the selection screen
TRANSLATE p_bkfile TO LOWER CASE.
OPEN DATASET p_bkfile FOR INPUT IN TEXT MODE." ENCODING DEFAULT.
IF sy-subrc NE 0.
* MESSAGE:
ELSE.
DO.
* Reading the file from application server
READ DATASET p_bkfile INTO <f_wa_table_data1>.
IF sy-subrc = 0.
APPEND <f_wa_table_data1> TO <f_table_data1>.
ELSE.
EXIT.
ENDIF.
ENDDO.
* Closing the dataset
CLOSE DATASET p_bkfile.
ENDIF.
ENDIF.
ENDFORM. " get_data
*& Form backup
* text
* --> p1 text
* <-- p2 text
FORM backup.
TRANSLATE p_bkfile TO LOWER CASE.
OPEN DATASET p_bkfile FOR OUTPUT IN TEXT MODE.
IF sy-subrc NE 0.
WRITE: text-017.
STOP.
ELSE.
LOOP AT <f_table_data1> ASSIGNING <f_wa_table_data1>.
TRANSFER <f_wa_table_data1> TO p_bkfile.
ENDLOOP.
ENDIF.
CLOSE DATASET p_bkfile.
ENDFORM. " backup
*& Form database_update
FORM database_update.
DATA : i_mara_u TYPE STANDARD TABLE OF mara WITH HEADER LINE,
i_ekpo_u TYPE STANDARD TABLE OF ekpo WITH HEADER LINE,
i_eban_u TYPE STANDARD TABLE OF eban WITH HEADER LINE,
i_resb_u TYPE STANDARD TABLE OF resb WITH HEADER LINE,
i_plpo_u TYPE STANDARD TABLE OF plpo WITH HEADER LINE,
i_stpo_u TYPE STANDARD TABLE OF stpo WITH HEADER LINE,
i_vbap_u TYPE STANDARD TABLE OF vbap WITH HEADER LINE,
i_vbrp_u TYPE STANDARD TABLE OF vbrp WITH HEADER LINE,
i_lips_u TYPE STANDARD TABLE OF lips WITH HEADER LINE,
i_afvc_u TYPE STANDARD TABLE OF afvc WITH HEADER LINE,
i_asmd_u TYPE STANDARD TABLE OF asmd WITH HEADER LINE,
* i_cooi_u TYPE STANDARD TABLE OF cooi WITH HEADER LINE,
i_qmel_u TYPE STANDARD TABLE OF qmel WITH HEADER LINE,
i_cooi_u TYPE STANDARD TABLE OF cooi WITH HEADER LINE,
i_esll_u TYPE STANDARD TABLE OF esll WITH HEADER LINE,
i_t165_u TYPE STANDARD TABLE OF t165 WITH HEADER LINE,
i_t165e_u TYPE STANDARD TABLE OF t165e WITH HEADER LINE,
i_twpko_u TYPE STANDARD TABLE OF twpko WITH HEADER LINE,
i_tpext_u TYPE STANDARD TABLE OF tpext WITH HEADER LINE,
i_ce4mxpa_u TYPE STANDARD TABLE OF ce4mxpa WITH HEADER LINE,
i_ce4mxpa_acct_u TYPE STANDARD TABLE OF ce4mxpa_acct WITH
HEADER LINE,
i_zaim_u TYPE STANDARD TABLE OF zaim WITH HEADER LINE,
i_s012_d TYPE STANDARD TABLE OF s012 WITH HEADER LINE,
i_s012_i TYPE STANDARD TABLE OF s012 WITH HEADER LINE,
i_dummy TYPE STANDARD TABLE OF mara.
CASE p_table.
WHEN 'MARA'.
* Non-Key
PERFORM move_to_table USING <f_table_data1>
CHANGING i_mara_u[]
i_mara_u.
PERFORM update_table USING i_mara_u[].
ENDCASE.
ENDFORM. " database_update
*& Form move_to_mara
FORM move_to_table USING p_tab_from TYPE STANDARD TABLE
CHANGING p_tab_to TYPE STANDARD TABLE
p_w_table.
DATA: l_wa_fcat TYPE lvc_s_fcat.
FIELD-SYMBOLS: <f_field_from> TYPE ANY,
<f_field_to> TYPE ANY.
LOOP AT p_tab_from ASSIGNING <f_wa_table_data1>.
LOOP AT i_fcat INTO l_wa_fcat.
ASSIGN COMPONENT l_wa_fcat-fieldname
OF STRUCTURE <f_wa_table_data1> TO <f_field_from>.
ASSIGN COMPONENT l_wa_fcat-fieldname
OF STRUCTURE p_w_table TO <f_field_to>.
<f_field_to> = <f_field_from>.
ENDLOOP.
APPEND p_w_table TO p_tab_to.
ENDLOOP.
ENDFORM. " move_to_mara
*& Form update_table
FORM update_table USING p_table_update TYPE STANDARD TABLE.
SELECT SINGLE *
FROM dd03l
WHERE fieldname = p_plfld
AND tabname = p_table
AND keyflag <> 'X'
AND as4local = 'A'
AND as4vers = l_v_as4vers
AND ( comptype = 'E' OR comptype = space ).
IF sy-subrc = 0.
* Do update
IF NOT p_table_update IS INITIAL.
UPDATE (p_table) FROM TABLE p_table_update.
IF sy-subrc = 0.
COMMIT WORK.
ELSE.
ROLLBACK WORK.
WRITE: text-003.
STOP.
ENDIF.
ENDIF.
ELSE.
*delete and insert.
IF NOT p_table_update IS INITIAL.
* DELETE (p_table).
IF sy-subrc = 0.
INSERT (p_table) FROM TABLE p_table_update.
IF sy-subrc = 0.
COMMIT WORK.
ELSE.
ROLLBACK WORK.
WRITE: text-018.
STOP.
ENDIF.
ELSE.
ROLLBACK WORK.
WRITE: text-018.
STOP.
ENDIF.
ENDIF.
ENDIF.
ENDFORM. " update_table
Edited by: Julius Bussche on Jul 18, 2008 1:43 PM
Please use a meaningfull subject title!ARS,
I am struggling a bit to get this.
there is a syntax error,
Field "FIELDS_INT-TYPE" is unknown. It is neither in one of thespecified tables nor defined by a "DATA" statement.
Again you have asked to move to a diffrent table. What is that table and how to build it.
LOOP AT <f_table_data1> ASSIGNING <f_wa_table_data1>.
LOOP AT i_fcat INTO l_fcat.
IF l_fcat-inttype EQ 'P'.
ASSIGN COMPONENT l_fcat-fieldname
OF STRUCTURE <f_wa_table_data1> TO <f_field>
TYPE fields_int-type
DECIMALS fields_int-decimals.
ELSE.
ASSIGN COMPONENT l_fcat-fieldname
OF STRUCTURE <f_wa_table_data1> TO <f_field>
TYPE fields_int-type.
ENDIF.
" Move <f_field> to a new table and use this table for download
ENDLOOP.
TRANSFER <f_wa_table_data1> TO p_bkfile.
ENDLOOP.
Ster -
Need ABAP Code to enhance the 0PRODORDER_ATTR?
I want to enhance the datasource 0PRODORDER_ATTR with the below JCDS Table fields like UDATE,STAT,OBJNR,INACT,CHGNR.
Can anyone please let me know the ABAP Code need to be written in the CMOD to populate the data for the above fields in the 0PRODORDER_ATTR?Hi,
You can use below code to enhancemnt .
You need to change the table, structure and field names
Below code you have to write in tocde CMOD if you are enhancing the master data. It applies for any master data, although, I have taken 0VENDOR_ATTR as the example. I assume that You have already added/appended the fields in the extract structure of 0VENDOR_ATTR i.e. to the structure BIW_LFA1_S. ( Check this link for how to enhance the DataSource : https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/b0af763b-066e-2910-a784-dc6731660f46 )
We have enhanced the datasorce for the following two fields from table LFA1:
ERDAT- Date on which the Record Was Created
KRAUS - Credit information number.
We have also enhaced the structure for the following fields from table LFB1.
MINDK - Minority Indicators
ZTERM - Terms of payment key
CERDT - Certification date.
Now we will poulate these two fields in the code written in CMOD tcode. Here is the code:
Go to the tcode CMOD in R3 and select the component EXIT_SAPLRSAP_002. Write this code in INCLUDE ZXLOFU01.
data : l_t_data like biw_lfa1_s.
data : l_tabix like sy-tabix.
CASE i_datasource.
WHEN '0VENDOR_ATTR'.
LOOP AT i_t_data INTO l_t_data.
l_tabix = sy-tabix.
CLEAR: l_t_data-yyerdat,
l_t_data-yykraus.
SELECT SINGLE erdat kraus FROM lfa1 INTO
( l_t_data-yyerdat, l_t_data-yykraus)
WHERE lifnr EQ l_t_data-lifnr.
SELECT SINGLE mindk zterm cerdt FROM lfb1 INTO
(l_t_data-yymindk, l_t_data-yyzterm, l_t_data-yycerdt)
WHERE lifnr = l_t_data-lifnr.
MODIFY i_t_data FROM l_t_data INDEX l_tabix.
CLEAR: l_t_data, l_tabix.
ENDLOOP.
ENDCASE.
Labels parameters -
Abap code to replace the bank values of Date Field with 20990101
Please correct my abap code I am just trying to replace the bank values of Dataefield to 20990101 but i am getting the error invalid dataformat '00000000 '. Please correct my IF statement so that I can get this resolved
IF SOURCE_FIELDS-DATETO = '00000000 '
RESULT = '20990101'.
ENDIF.
Thanks'
SoniyaHi Soniya,
You can use one of the following:
IF SOURCE_FIELDS-DATETO = ' '.
RESULT = '20990101'.
ENDIF.
or
IF SOURCE_FIELDS-DATETO IS INITIAL.
RESULT = '20990101'.
ENDIF.
or
IF SOURCE_FIELDS-DATETO = '00000000'.
" THERE WAS A SPACE IN YOUR CODE.
RESULT = '20990101'.
ENDIF.
Regards,
Satya -
ABAP Store ABAP code locally on the disk
Hello
I have a question, how download the Web dynpro ABAP code from the SAP System.
Could You give me a hint how to save code locally on the disk?
Regards
WojtekI started from http://code.google.com/p/saplink/ .
Then in http://code.google.com/p/saplink/wiki/pluginList I found the plug-in for ABAP Web Dynpro.
It still in ALPHA status and to be honest I got trouble installing it (in fact there is the note: But WDA plugin requires SAPlink 0.1.3 or greater).
You should get it running because I can see the nugg file.
Eventually ask navigate to the http://code.google.com/p/saplink/issues/list and the other pages of http://code.google.com/p/saplink.
Sergio -
Abap Code to Repeat the field (3nos) Values for all the fields
Hi Friends I have a Requirement to merge the Data for One of my BI - BCS model.
I have fields in one table(/BIC/AZDBBCP_040) <b>business Num , PRCTR, REGION and RELOCAT</b> and Field ZAUD_TYP and Audit Year Zyear also in same table.
But I want to reapeat this information Highlighted in Bold for all the Zaudtyp and ZYEAR. Please help me with the Code
<b>Problem as below</b>
BUSNUM PRCTR REGION RELOCAT ZAUD_TYP ZYEAR
101 22 ALAN MN
101 GT(ZAUD_TYP) 1999(ZYEAR)
101 BTE 2001
102 25 CA SFO
102 LTE 2008
Please help me with any Code to fix the problem so that the data repeat for PRCTR REGION RELOCAT where Bus Num is same.
Kindly Get me any ABAB Code . Will really be thankful to you
Regards
Soniya Kapoor
soniya kapoor
Message was edited by:
soniya kapoorHi Soniya,
You can use one of the following:
IF SOURCE_FIELDS-DATETO = ' '.
RESULT = '20990101'.
ENDIF.
or
IF SOURCE_FIELDS-DATETO IS INITIAL.
RESULT = '20990101'.
ENDIF.
or
IF SOURCE_FIELDS-DATETO = '00000000'.
" THERE WAS A SPACE IN YOUR CODE.
RESULT = '20990101'.
ENDIF.
Regards,
Satya -
ABAP Code Split at the decimal
Dear experts,
I have a small requirement where in I need to split the qty at the decimal place and use the non decimal value as a character field.
Eg: WA_ITAB-LFIMG = 12.000
I want only 12 into one variable which has only capacity of 4 characters (Lfimg has 1313 characters).
I tried the following code, but it did not work.
I was able to successfully split the value and pass it onto the corresponsing entries but unable to pass the value into a variable of 4 characters,
Can some one please help me in this.
It_itab has lfimg
data : var(17) type c,
qty(13) type c,
qty_dec(3) type c,
val(4) type c.
constants : ca(1) type c value '.'.
read table it_itab into wa_itab index 1.
var = wa_itab-lfimg.
split var at ca into qty qty_dec. " This worked
val = qty. " This did not work
Thanks
-AmitHi Amit,
use TRUNC function:
data :
qty_dec(3) type c,
val(4) type c.
val = trunc( WA_ITAB-LFIMG ).
qty_dec = ( WA_ITAB-LFIMG - trunc( WA_ITAB-LFIMG ) ) * 1000.
Regards,
Clemens -
Code for reading the and placing the file using java webservice
Hi All,
Can anybody can guide me on how to read a file and place the file using java.
Let me know if any code is available which has been completed using java.
Regards,
RahulHi,
The "square" symbol that you are referring to is probably a CRLF (Carriage Return - Life Feed) Control Character.
This is more commonly known as a "Enter" at the end of a line / sentence.
To clean this character from strings in Java, please use:
String patternStr = "(?m)$^|[\\r\\n]+\\z";
String replaceStr = " ";
Pattern pattern = Pattern.compile(patternStr);
Matcher matcher = pattern.matcher(inputStr);
return matcher.replaceAll(replaceStr);
Hope that helps.
Thanks.
p256960.
Maybe you are looking for
-
Extract report only runs on a single core
I am running the following extract report on a dual quad-core processor server with 32 GB ram and when I suppress empty rows the process runs on a single core which of course runs at 100% slowing down the process, but if I do not sppress rows all cor
-
How can I change the email address of my Apple identifyer?
I changed email provider*, it affects my apple identifier . When I buy something it used to send me emails to that old address. How can I change the email of my identifyer? Today i bought something and it said it was the first time I used my machin
-
Graph average temperatur​e from a field point device
Hi, This is first ever post. I'm an absolute biginner in LV and engineering student in University of Houston. I'm simply tring to read a cFP-TC-120 device and avarage first 100 values of each of 8 thermocouple values and draw graphs for each channel.
-
Signed a 1-year contract and then AT&T raised price
I was going to cancel my service in December last year, but when I called to cancel, AT&T offered U200 for a certain rate for 12 months in exchange for me signing a contract for one-year. So I agreed to keep AT&T U-Verse for 1 year and pay that set
-
After Effects CS3 - error: could not create 8935 x 9152 image buffer + slow
Hello. I am receiving this error message every time i try render my 3min composition. it gets about 1/5 way through which takes about an hour. i have read the General Specialist troubleshooting guide and it has not helped yet. i am now rendering with