Replace innerHTML with string
Hi together!
I would like to change the innerHTML of a specific element.
Is there a prototype like spry function for this? I think I read
this somwhere. I would like to avoid to load the prototype scripts
having already loaded the SpryUtils.
I tried
Spry.$$("#hurz caption").setInnerHTML("Blabla");
But this method is not existing in the $$ element Utils. :-(
var ele = document.getElementById("hurz");
Spry.Utils.setInnerHTML(ele,'Blabla');
I think this should work, but it doesn't. And it would not
cover exactly the HTML i would like to change.
Thanks for any help.
Marcus
Spry.$('hurz').innerHTML = 'bla bla';
or to fix the $$
add this at the bottom of your SpryDOMUtils.js
Spry.$$.Results.innerHTML = function(value)
return this.forEach(function(n) { n.innerHTML = value; });
Similar Messages
-
Replace "untitled" with string?
I would like to replace the default name for a document with information pulled from a dialog within a javascript.
example:
Dialog:
1.What's your name?
2.What's you phone number?
end result: Bill-555-5555.indd
We have several naming protocols for files based on their job type and we would like to automate the naming upon save.
I know where to obtain the data, I just don't know how to write it to the save-as dialog.Does this help?
var myFile = File("~/Desktop/myName.indd");
var myFile = myFile.saveDlg(myFile);
app.documents[0].save(myFile);
Basically, you create a file object (the file referenced by name does not need to exist; indeed, if it does, you'll overwrite it with this code). Then the saveDlg call opens the Save As dialog with the name of the file object you just created and at the folder that would hold that file if it existed. I chose to use the desktop but it could be any folder anywhere.
Dave -
Replace charcter from string in 46c
Hi,
If you could send me code for below scanerio that will be great.
in 46c i have string '/ABCD/te_12' now i want to replace the '/' with '+' and '_' with '|', can you tell me how to do this.
thanks,
johnhi check the replace statement... hit F1 on replace and make ur code..
Basic form
REPLACE f WITH g INTO h.
Addition
... LENGTH len (length specification for field f )
Effect
Replaces the first occurrence of the contents of field f in field h with the contents of field g . All fields are handled in their defined length; this means that closing blanks are not ignored.
The return code value indicates whether the string f was found in h and replaced by g :
SY-SUBRC = 0 String replaced.
SY_SUBRC = 4 String not replaced.
Example
DATA FIELD(10).
MOVE 'ABCB' TO FIELD.
REPLACE 'B' WITH 'string' INTO FIELD.
returns:
FIELD = 'AstringCB', SY-SUBRC = 0
Note
The fields f and g in the REPLACE statement should not overlap. Otherwise, the result is undefined.
Addition
... LENGTH len ... (length specification for field f )
Effect
Searches for the string f in the field h not in its (full) field length, but in the length len .
Example
DATA: PATTERN(5) VALUE 'ABC',
LEN TYPE I,
REPL_STRING(5) VALUE '12345',
FIELD(12) VALUE 'abcdeABCDE'.
REPLACE PATTERN WITH REPL_STRING
INTO FIELD.
does not change FIELD , since 'ABC ' does not occur in abcdeABCDE ' .
LEN = STRLEN( PATTERN ).
REPLACE PATTERN LENGTH LEN
WITH REPL_STRING
INTO FIELD. -
How Can I replace newScale Text Strings with Custom Values?
How Can I replace newScale Text Strings with Custom Values?
How can I replace newScale text strings with custom values?
All newScale text is customizable. Follow the procedure below to change the value of any text string that appears in RequestCenter online pages.
Procedure
1. Find out the String ID of the text string you would like to overwrite by turning on the String ID display:
a) Navigate to the RequestCenter.ear/config directory.
b) Open the newscale.properties file and add the following name-value pair at the end of the file:res.format=2
c) Save the file.
d) Repeat steps b and c for the RmiConfig.prop and RequestCenter.prop files.
e) Stop and restart the RequestCenter service.
f) Log in to RequestCenter and browse to the page that has the text you want to overwrite. In front of the text you will now see the String ID.
g) Note down the String ID's you want to change.
2. Navigate to the directory: /RequestCenter.ear/RequestCenter.war/WEB-INF/classes/com/newscale/bfw.
3. Create the following sub-directory: res/resources
4. Create the following empty text files in the directory you just created:
RequestCenter_0.properties
RequestCenter_1.properties
RequestCenter_2.properties
RequestCenter_3.properties
RequestCenter_4.properties
RequestCenter_5.properties
RequestCenter_6.properties
RequestCenter_7.properties
5. Add the custom text strings to the appropriate RequestCenter_<Number>.properties file in the following manner (name-value pair) StringID=YourCustomTextString
Example: The StringID for "Available Work" in ServiceManager is 699.
If you wanted to change "Available Work" to "General Inbox", you would add the following line to the RequestCenter_0.properties file
699=General Inbox
Strings are divided into the following files, based on their numeric ID:
Strings are divided into the following files, based on their numeric ID:
String ID File Name
0 to 999 -> RequestCenter_0.properties
1000 to 1999 -> RequestCenter_1.properties
2000 to 2999 -> RequestCenter_2.properties
3000 to 3999 -> RequestCenter_3.properties
4000 to 4999 -> RequestCenter_4.properties
5000 to 5999 -> RequestCenter_5.properties
6000 to 6999 -> RequestCenter_6.properties
7000 to 7999 -> RequestCenter_7.properties
6. Turn off the String ID display by removing (or commenting out) the line "res.format=2" from the newscale.properties, RequestCenter.prop and RmiConfig.prop files
7. Restart RequestCenter.
Your customized text should be displayed.I've recently come across this information and it was very helpful in changing some of the inline text.
However, one place that seemed out of reach with this method was the three main buttons on an "Order" page. Specifically the "Add & Review Order" button was confusing some of our users.
Through the use of JavaScript we were able to modify the label of this button. We placed JS in the footer.html file that changes the value of the butt -
Hello Experts,
First off - I'm a newbee to all this JS and especially with CS3.
I have a string: '
b myDocumentName
which can have it's value as: '
b 00000en_ Generator WX/WY
Problem is, backshlashes ( / )are a bad thing for me...
b Question:
How can I do a 'replace' operation to replace the '/' from the string with a '_'?
I have at the moment:
> var myDocSaveName = oneResult[3]+oneResult[4]+oneResult[5];
> myDocSaveName.replace(what "/", with "");
> myDoc.save ("C:/DATA/"+myDocSaveName, undefined, undefined, true)
I get an error Nr. 25... Offending text:"/"
What am I doing wrong?'what' and 'with' are the names of those arguments. They should not be included in the statement:
myDocSaveName.replace("/", "");
But that still won't work because replace doesn't operate on a string in situ, it returns the modified string. So:
myDocSaveName = myDocSaveName.replace("/", "");
This too has its limitations. It'll change only the first instance of "/", not all of them. To change all of them, you need to restate the 'what' as a RegExp:
myDocSaveName = myDocSaveName.replace(/\//g, "_");
A RegExp literal is delimited by the "/" character, so to have it, alone, as the character to be sought you must use the backslash to escape the character. Then, to indicate you want the replace to happen globally within the string, you add the 'g' after the RegExp.
Dave -
Replace JLabel with a string in JTextPane
Hi all,
anyone knows if there is a way to replace a JLabel with a string in a JTextPane?
The string is contained within the label.
My problem is that when the user is viewing the textpane, he sees a mixed text with strings and labels...but when i save the text, i want to convert the labels in their respective IDs.
Tnx!First you say
"I need to replace JLabel with a JButton"
Then you say
"but i have to change the label of the button as it is being clicked."
So what are you trying to do, just change the text of the button or replace a JLabel with a JButton. We can't give you any help unless you ask a clear question. -
REPLACE 0 with text string "NO INVOICE"
Hi!
I run this code:
SELECT C.ID, C.NAME, COUNT(I.CUSTOMER_ID)
FROM CUSTOMER C, INVOICE I
WHERE C.ID = I.CUSTOMER_ID (+)
GROUP BY C.ID, C.NAME
And a sample of the result looks like this:
ID NAME COUNT(I.CUSTOMER_ID)
100001 Reggaekolletivet regnbågen 5
100003 Nils Åkerlund 2
100002 Bengt Larsson 0
100006 Stadsarkitektkontoret i Flen 4
100005 Lena Ekman 3
100007 Dagiset Myran 0
100004 Biblioteket Höken 3
I´m trying to figure out how to replace 0 with "NO INVOICE" in column COUNT(I.CUSTOMER_ID). Does anyone know how to achieve that?
Best regards, DanielThanks, works perfect!
Does COUNT(I.CUSTOMER_ID) cnt mean that
COUNT(I.CUSTOMER_ID) is declared as cnt?
And the cnt is returned from the sub-select clause to
the primary select clause on the first row?
Best regards,
Daniel"cnt" is the alias name assigned to the value, and you are correct that that is what the outer select statement is obtaining from the sub-select.
;) -
Required replace BSEG with BSAK BSIK BSIS BSAS for report performance
Hi Experts
i m optimizing a report in which data is extracting from BSEG , 5 time so i reduses the performance of report
so i want replace BSEG with BSAK BSIK BSIS BSAS for the same data what I am getting now . this is report of Purchase of item. code is here.
REPORT zmm_pur_reg_kanhe LINE-SIZE 1023.
*& Des :Purchase Tax Register Report for KANHE
*& Created on :12-07-07
*& Suggested by:Paresh Saini(MM)
*& Changes By: Lailu Philip
*& Changed On: 24.09.2007
*& Changes: New columns for G/L Code Description,VAT Amt,VAT Perc,CST Perc
*& ,SHCESS Amounts,WCT G/L Acc., WCT Amt,Tax Code
*& for Purchase Order,WCT tax code & Percentage.
*& Request No: S6DK921577
Data Declaration
*& changes: by Vincy on 12.01.2007
*& changes: display purchase order with vendor type zpsr(get_zpsr)
*& Request No: S6DK930821
TABLES:ekbe, lfa1, faglflexa.",j_1iexcdtl,lfa1,bkpf,bseg.
TYPE-POOLS: slis. "ALV Declarations
DATA: fieldcatalog TYPE slis_t_fieldcat_alv WITH HEADER LINE,
gd_layout TYPE slis_layout_alv,
gd_repid LIKE sy-repid.
DATA: it_sortcat TYPE slis_sortinfo_alv OCCURS 1,
col_pos LIKE fieldcatalog-col_pos .
TYPES :BEGIN OF wa1_ekbe,
belnr TYPE ekbe-belnr,
budat TYPE ekbe-budat,
menge TYPE ekbe-menge,
matnr TYPE ekbe-matnr,
ebelp TYPE j_1iexcdtl-ritem1,
ebeln TYPE ekbe-ebeln,
gjahr TYPE ekbe-gjahr,
lfbnr TYPE ekbe-lfbnr,
lfpos TYPE ekbe-lfpos,
bldat TYPE ekbe-bldat,
REEWR TYPE REEWR,
END OF wa1_ekbe.
TYPES :BEGIN OF wa2_ekbe,
belnr TYPE ekbe-belnr,
budat TYPE ekbe-budat,
menge TYPE ekbe-menge,
ebelp TYPE ekbe-ebelp,
ebeln TYPE ekbe-ebeln,
gjahr TYPE ekbe-gjahr,
lfbnr TYPE ekbe-lfbnr,
lfpos TYPE ekbe-lfpos,
bldat TYPE ekbe-bldat,
REEWR TYPE REEWR,
awkey(20) TYPE c,
MATNR TYPE MATNR,
MWSKZ TYPE EKBE-MWSKZ,
END OF wa2_ekbe.
TYPES :BEGIN OF wa1_j_1iexcdtl,
exnum TYPE j_1iexcdtl-exnum,
exdat TYPE j_1iexcdtl-exdat,
lifnr TYPE j_1iexcdtl-lifnr,
matnr TYPE j_1iexcdtl-matnr ,
maktx TYPE j_1iexcdtl-maktx ,
capind TYPE j_1iexcdtl-capind,
exbas TYPE j_1iexcdtl-exbas,
exbed TYPE j_1iexcdtl-exbed,
ecs TYPE j_1iexcdtl-ecs,
werks TYPE j_1iexcdtl-werks,
ritem1 TYPE j_1iexcdtl-ritem1,
rdoc1 TYPE j_1iexcdtl-rdoc1,
docyr TYPE j_1iexcdtl-docyr,
bedinv type J_1IBEDINV,
ecsinv type J_1IECSINV,
EXADDINV1 type J_1IEXADDINV1,
exaddtax1 TYPE j_1iexcdtl-exaddtax1,
rdoc2 TYPE j_1iexcdtl-rdoc2,
ritem2 TYPE j_1iexcdtl-ritem2,
menge TYPE j_1iexcdtl-menge,
ADDED FOR RUDRAPUR ON 08.03.2008 BY ASHOK.CH
*ENDED ON 08.02.2008
END OF wa1_j_1iexcdtl.
TYPES :BEGIN OF wa1_lfa1,
name1 TYPE lfa1-name1,
ktokk TYPE lfa1-ktokk,
werks TYPE lfa1-werks,
lifnr TYPE lfa1-lifnr,
END OF wa1_lfa1.
TYPES :BEGIN OF wa1_ekexclf,
belnr TYPE ekbe-belnr,
budat TYPE ekbe-budat,
menge TYPE ekbe-menge,
ebelp TYPE ekbe-ebelp,
ebeln TYPE ekbe-ebeln,
gjahr TYPE ekbe-gjahr,
awkey(20) TYPE c,
exnum TYPE j_1iexcdtl-exnum,
exdat TYPE j_1iexcdtl-exdat,
lifnr TYPE j_1iexcdtl-lifnr,
matnr TYPE j_1iexcdtl-matnr ,
maktx TYPE j_1iexcdtl-maktx ,
capind TYPE j_1iexcdtl-capind,
exbas TYPE j_1iexcdtl-exbas,
exbed TYPE j_1iexcdtl-exbed,
ecs TYPE j_1iexcdtl-ecs,
werks TYPE j_1iexcdtl-werks,
ritem1 TYPE j_1iexcdtl-ritem1,
rdoc1 TYPE j_1iexcdtl-rdoc1,
docyr TYPE j_1iexcdtl-docyr,
name1 TYPE lfa1-name1,
ktokk TYPE lfa1-ktokk,
exaddtax1 TYPE j_1iexcdtl-exaddtax1,
added for rudrapur on 08.03.2008 by ASHOK.CH
bedinv type J_1IBEDINV,
ecsinv type J_1IECSINV,
EXADDINV1 type J_1IEXADDINV1,
END OF MODIFICATION ON 08.02.2008
END OF wa1_ekexclf.
TYPES :BEGIN OF wa1_bkpf,
bukrs TYPE bkpf-bukrs,
belnr TYPE bkpf-belnr,
gjahr TYPE bkpf-gjahr,
budat TYPE bkpf-budat,
tcode TYPE bkpf-tcode,
awkey TYPE bkpf-awkey,
END OF wa1_bkpf.
TYPES :BEGIN OF wa1_bseg,
bukrs TYPE bseg-bukrs,
belnr TYPE bseg-belnr,
gjahr TYPE bseg-gjahr,
buzei TYPE bseg-buzei,
bschl TYPE bseg-bschl,
fwbas TYPE bseg-fwbas ,
pswbt TYPE bseg-pswbt,
hkont TYPE bseg-hkont,
wrbtr TYPE bseg-wrbtr,
ktosl TYPE bseg-ktosl,
koart TYPE bseg-koart,
shkzg TYPE bseg-shkzg,
mwskz TYPE bseg-mwskz,
qsskz TYPE bsis-qsskz,
dmbtr TYPE bseg-dmbtr,
lifnr TYPE bseg-lifnr,
matnr TYPE bseg-matnr,
flag TYPE C,
flag_21 TYPE C,
END OF wa1_bseg.
TYPES :BEGIN OF wa1_tax,
belnr TYPE bseg-belnr,
fi_docno TYPE bseg-belnr,
gjahr TYPE bseg-gjahr,
bukrs TYPE bseg-bukrs,
awkey TYPE bkpf-awkey,
fwbas TYPE bseg-fwbas ,
cst_amt TYPE bseg-pswbt,
vat_amt TYPE bseg-pswbt,
shcess_amt TYPE bseg-pswbt,
gl_accnt TYPE bseg-hkont,
gl_desc TYPE skat-txt50,
wctglacc TYPE bseg-hkont,
wctamt TYPE bseg-dmbtr,
taxcode TYPE t059z-wt_withcd,
taxperc TYPE t059z-qsatz,
total_value TYPE bseg-wrbtr,
set_off TYPE bseg-wrbtr,
cond_type TYPE konv-kschl,
description(20) TYPE c,
service_tax TYPE bseg-wrbtr,
service_ecess TYPE bseg-wrbtr,
service_shcess TYPE bseg-wrbtr, "vincy on 31.01.08
ebelp TYPE ekbe-ebelp, " on 15.04.08
flag TYPE c,
mwskz TYPE bseg-mwskz,
END OF wa1_tax.
DATA:BEGIN OF itab_skat,
saknr TYPE skat-saknr,
spras TYPE skat-spras,
txt50 TYPE skat-txt50,
END OF itab_skat.
DATA: iskat LIKE itab_skat OCCURS 0,
wa_skat LIKE itab_skat.
DATA : BEGIN OF zbsis OCCURS 0,
bukrs TYPE bsis-bukrs,
hkont TYPE bsis-hkont,
augdt TYPE bsis-augdt,
augbl TYPE bsis-augbl,
zuonr TYPE bsis-zuonr,
gjahr TYPE bsis-gjahr,
belnr TYPE bsis-belnr,
buzei TYPE bsis-buzei,
budat TYPE bsis-budat,
qsskz TYPE bsis-qsskz,
END OF zbsis.
DATA: BEGIN OF zt059z OCCURS 0,
land1 TYPE t059z-land1,
witht TYPE t059z-witht,
wt_withcd TYPE t059z-wt_withcd,
qscod TYPE t059z-qscod,
qsatz TYPE t059z-qsatz,
hkont TYPE bsis-hkont,
belnr TYPE bsis-belnr,
END OF zt059z.
DATA: BEGIN OF it_faglflexa OCCURS 0, "added by vincy
ryear TYPE faglflexa-ryear,
docnr TYPE faglflexa-docnr,
rldnr TYPE faglflexa-rldnr,
rbukrs TYPE faglflexa-rbukrs,
docln TYPE faglflexa-docln,
prctr TYPE faglflexa-prctr,
END OF it_faglflexa.
Final Table***
TYPES :BEGIN OF wa1_final,
belnr TYPE ekbe-belnr,
fi_docno TYPE bseg-belnr,
budat TYPE ekbe-budat,
menge TYPE ekbe-menge,
rate TYPE konv-kbetr,
ebelp TYPE ekbe-ebelp,
ebeln TYPE ekbe-ebeln,
mwskz TYPE bseg-mwskz,
gjahr TYPE ekbe-gjahr,
awkey(20) TYPE c,
exnum TYPE j_1iexcdtl-exnum,
exdat TYPE j_1iexcdtl-exdat,
lifnr TYPE j_1iexcdtl-lifnr,
matnr TYPE j_1iexcdtl-matnr ,
maktx TYPE j_1iexcdtl-maktx ,
capind TYPE string,
exbas TYPE j_1iexcdtl-exbas,
exbed TYPE j_1iexcdtl-exbed,
ecs TYPE j_1iexcdtl-ecs,
werks TYPE j_1iexcdtl-werks,
ritem1 TYPE j_1iexcdtl-ritem1,
rdoc1 TYPE j_1iexcdtl-rdoc1,
docyr TYPE j_1iexcdtl-docyr,
name1 TYPE lfa1-name1,
ktokk TYPE lfa1-ktokk,
fwbas TYPE bseg-fwbas ,
vat_per TYPE konv-kbetr,
vat_amt TYPE bseg-pswbt,
cst_per TYPE konv-kbetr,
cst_amt TYPE bseg-pswbt,
shcess_amt TYPE bseg-pswbt,
gl_accnt TYPE bseg-hkont,
gl_desc TYPE skat-txt50,
wctglacc TYPE bseg-hkont,
wctamt TYPE bseg-dmbtr,
taxcode TYPE t059z-wt_withcd,
taxperc TYPE t059z-qsatz,
total_value TYPE bseg-wrbtr,
total_value1 TYPE bseg-wrbtr,
excise_tax TYPE bseg-wrbtr,
excise TYPE bseg-wrbtr,
set_off TYPE bseg-wrbtr,
inventorised TYPE konv-kawrt,
cond_type TYPE konv-kschl,
cond_type2 TYPE konv-kschl,
description(20) TYPE c,
service_tax TYPE bseg-wrbtr,
service_ecess TYPE bseg-wrbtr,
service_shcess TYPE bseg-wrbtr, "vincy on 31.01.08
END OF wa1_final.
DATA :it2_ekbe TYPE TABLE OF wa1_ekbe WITH HEADER LINE,
it_ekbe TYPE TABLE OF wa1_ekbe WITH HEADER LINE,
it1_ekbe TYPE TABLE OF wa2_ekbe WITH HEADER LINE WITH KEY ebelp ebeln,
it_j_1iexcdtl TYPE TABLE OF wa1_j_1iexcdtl WITH HEADER LINE WITH KEY rdoc1 ritem1,
it_lfa1 TYPE TABLE OF wa1_lfa1 WITH HEADER LINE WITH KEY lifnr,
it_lfa2 TYPE TABLE OF wa1_lfa1 WITH HEADER LINE WITH KEY lifnr,
it_bkpf TYPE TABLE OF wa1_bkpf WITH HEADER LINE,
it_bseg TYPE TABLE OF wa1_bseg WITH HEADER LINE WITH KEY
bukrs belnr gjahr ktosl shkzg koart,
it1_bseg TYPE TABLE OF wa1_bseg WITH HEADER LINE WITH KEY
bukrs belnr gjahr ktosl shkzg koart,
it_tax TYPE TABLE OF wa1_tax WITH HEADER LINE WITH KEY awkey ,
it_ekexclf TYPE TABLE OF wa1_ekexclf WITH HEADER LINE,
it_final TYPE TABLE OF wa1_final WITH HEADER LINE,
it_final1 TYPE TABLE OF wa1_final WITH HEADER LINE, "vincy
wa_ekbe TYPE wa1_ekbe,
wa1_ekbe TYPE wa2_ekbe,
wa_j_1iexcdtl TYPE wa1_j_1iexcdtl,
wa_lfa1 TYPE wa1_lfa1,
wa_lfa2 TYPE wa1_lfa1,
wa_bkpf TYPE wa1_bkpf,
wa_bseg TYPE wa1_bseg,
wa_tax TYPE wa1_tax,
wa_ekexclf TYPE wa1_ekexclf,
PLANT TYPE WERKS_D,
wa_final TYPE wa1_final.
DATA: it_konv TYPE konv OCCURS 0 WITH HEADER LINE ,
wa_konv TYPE konv,
invent TYPE p DECIMALS 4,
invent1 TYPE konv-kawrt.
DATA:d1 TYPE konv-kposn,
d2 TYPE ekbe-ebelp.
DATA: v_belnr TYPE ekbe-belnr,
v_gjahr TYPE ekbe-gjahr,
v_awkey(20) TYPE c,
idx TYPE sy-tabix.
**********by vincy on 12.01.07***********
DATA: BEGIN OF it_ekko OCCURS 0,
ebeln LIKE ekko-ebeln,
bukrs LIKE ekko-bukrs,
bsart LIKE ekko-bsart,
lifnr LIKE ekko-lifnr,
belnr LIKE ekbe-belnr,
END OF it_ekko.
DATA: BEGIN OF it_ekpo OCCURS 0,
ebeln LIKE ekpo-ebeln,
ebelp LIKE ekpo-ebelp,
txz01 LIKE ekpo-txz01,
END OF it_ekpo.
DATA: BEGIN OF it_lfa1v OCCURS 0,
lifnr LIKE lfa1-lifnr,
name1 LIKE lfa1-name1,
END OF it_lfa1v.
DATA: BEGIN OF s_prctr OCCURS 0,
low LIKE faglflexa-prctr,
END OF s_prctr.
DATA: it_bsegv TYPE TABLE OF wa1_bseg WITH HEADER LINE.
DATA: it_konv1 LIKE konv OCCURS 0 WITH HEADER LINE.
DATA:cnt TYPE i,
awkey1(250).
DATA: LIFNR TYPE LIFNR,
NAME TYPE NAME1_GP,
MTART TYPE MARA-MTART,
MAKTX TYPE MAKTX,
TAX_TOT TYPE KWERT.
***********end of changes by vincy ************
Selection Screen
SELECTION-SCREEN BEGIN OF BLOCK b1 WITH FRAME TITLE text-001.
SELECT-OPTIONS: s_werks1 FOR ekbe-werks,
s_budat1 FOR ekbe-budat,
s_fiscal FOR ekbe-gjahr,
s_lifnr FOR lfa1-lifnr.
SELECTION-SCREEN END OF BLOCK b1.
**"changes being by nahid on 16.04.2008
PARAMETERS : excel AS CHECKBOX DEFAULT 'X'.
PARAMETERS: infile LIKE rlgrap-filename.
DATA : zfile TYPE string.
**"changes ended by nahid on 16.04.2008
AT SELECTION-SCREEN.
IF s_werks1 IS INITIAL.
MESSAGE 'Please Enter Plant details' TYPE 'E'.
ENDIF.
IF s_budat1 IS INITIAL.
MESSAGE 'Please Enter Posting date' TYPE 'E'.
ENDIF.
IF s_fiscal IS INITIAL.
MESSAGE 'Please Enter Fiscal Year' TYPE 'E'.
ENDIF.
*start change by nahid on 16.4.08
AT SELECTION-SCREEN ON VALUE-REQUEST FOR infile.
CALL FUNCTION 'KD_GET_FILENAME_ON_F4'
CHANGING
file_name = infile
EXCEPTIONS
mask_too_long = 1
OTHERS = 2.
zfile = infile.
*end change by nahid on 16.4.08
START-OF-SELECTION.
plant = s_werks1-low.
MODIFIED FOR RUDRAPUR BY ASHOK.CH ON 13.03.2008
IF PLANT NE 'RD01'.
PERFORM get_data.
PERFORM get_zpsr. "vincy
ENDIF.
IF PLANT EQ 'RD01'.
PERFORM get_data1.
ENDIF.
*END OF MODIFICATION ON 13.03.2008
PERFORM build_fieldcatalog.
PERFORM build_layout.
PERFORM display_alv_report.
*start chng by nahid on 16.4.08
IF excel = 'X'.
IF NOT infile IS INITIAL.
PERFORM excel_data.
ELSE.
MESSAGE e000(0) WITH 'Please Enter the File Path'.
ENDIF.
ENDIF.
*end by nahid on 16.4.08
*& Form get_data
FORM get_data .
SELECT belnr budat menge matnr ebelp ebeln gjahr lfbnr lfpos bldat REEWR FROM ekbe INTO
TABLE it_ekbe
WHERE werks IN s_werks1 AND
(bewtp EQ 'Q' OR bewtp EQ 'N') AND
bewtp IN ('Q' , 'N') AND "added N by vincy on 6.07.2008
budat IN s_budat1 AND
gjahr IN s_fiscal .
IF sy-subrc = 0. "for 1st ekbe
IF it_ekbe[] IS NOT INITIAL.
SELECT exnum exdat lifnr matnr maktx capind exbas exbed ecs werks
ritem1 rdoc1 docyr bedinv ecsinv EXADDINV1 exaddtax1 rdoc2 ritem2 menge
FROM j_1iexcdtl INTO TABLE it_j_1iexcdtl FOR ALL ENTRIES IN it_ekbe
WHERE rdoc1 = it_ekbe-ebeln
AND ritem1 = it_ekbe-ebelp AND
lifnr IN s_lifnr.
ENDIF.
IF it_j_1iexcdtl[] IS NOT INITIAL.
SELECT name1 ktokk werks lifnr FROM lfa1 INTO
TABLE it_lfa1 FOR ALL ENTRIES IN it_j_1iexcdtl
WHERE lifnr = it_j_1iexcdtl-lifnr.
ENDIF.
LOOP AT it_ekbe INTO wa_ekbe.
wa1_ekbe-belnr = wa_ekbe-belnr.
wa1_ekbe-budat = wa_ekbe-budat.
wa1_ekbe-menge = wa_ekbe-menge.
wa1_ekbe-ebelp = wa_ekbe-ebelp.
wa1_ekbe-ebeln = wa_ekbe-ebeln.
wa1_ekbe-gjahr = wa_ekbe-gjahr.
wa1_ekbe-matnr = wa_ekbe-matnr.
wa1_ekbe-lfbnr = wa_ekbe-lfbnr.
wa1_ekbe-lfpos = wa_ekbe-lfpos.
wa1_ekbe-bldat = wa_ekbe-bldat.
v_belnr = wa_ekbe-belnr.
v_gjahr = wa_ekbe-gjahr.
CONCATENATE v_belnr v_gjahr INTO v_awkey.
wa1_ekbe-awkey = v_awkey.
APPEND wa1_ekbe TO it1_ekbe.
CLEAR :wa_ekbe.
ENDLOOP.
************changes by vincy on 29.05.08 for 'FB08' and 'FB60'**************
LOOP AT s_werks1.
IF s_werks1-low = 'KN01'.
s_prctr-low = 'MUKNHSTM'.
ELSEIF
s_werks1-low = 'NS01'.
s_prctr-low = 'MUNSKSTM'.
ELSEIF
s_werks1-low = 'RD01'.
s_prctr-low = 'MURDPSTM'.
ENDIF.
APPEND s_prctr.
ENDLOOP.
SELECT bukrs belnr gjahr budat tcode awkey FROM bkpf INTO TABLE it_bkpf
WHERE bukrs = 'MU51' AND
gjahr IN s_fiscal AND
budat IN s_budat1 AND
( tcode = 'FB60' OR tcode = 'FB08' ).
IF it_bkpf[] IS NOT INITIAL.
SELECT ryear docnr rldnr rbukrs docln prctr FROM faglflexa INTO TABLE it_faglflexa
FOR ALL ENTRIES IN it_bkpf WHERE rbukrs = 'MU51' AND
ryear = it_bkpf-gjahr AND
docnr = it_bkpf-belnr.
ENDIF.
LOOP AT it_faglflexa.
READ TABLE s_prctr WITH KEY low = it_faglflexa-prctr.
IF sy-subrc <> 0.
DELETE it_faglflexa.
ENDIF.
CLEAR: it_faglflexa, s_prctr.
ENDLOOP.
**************************end of change*************************************
IF it1_ekbe[] IS NOT INITIAL.
SELECT bukrs belnr gjahr budat tcode awkey FROM bkpf APPENDING
TABLE it_bkpf FOR ALL ENTRIES IN it1_ekbe
WHERE bukrs = 'MU51' AND
gjahr IN s_fiscal AND
awkey = it1_ekbe-awkey.
ENDIF.
IF sy-subrc = 0. "bkpf
IF it_bkpf[] IS NOT INITIAL.
SELECT bukrs belnr gjahr buzei bschl fwbas pswbt hkont wrbtr ktosl koart shkzg mwskz qsskz dmbtr lifnr matnr
FROM bseg INTO TABLE it1_bseg FOR ALL ENTRIES IN it_bkpf
WHERE belnr = it_bkpf-belnr AND
gjahr = it_bkpf-gjahr AND
bukrs = it_bkpf-bukrs AND
( bschl = '21' ) AND
lifnr IN s_lifnr. "added 21 for miro cancelation
IF it1_bseg[] IS NOT INITIAL.
SELECT bukrs belnr gjahr buzei bschl fwbas pswbt hkont wrbtr ktosl koart shkzg mwskz qsskz dmbtr lifnr matnr
FROM bseg INTO TABLE it_bseg FOR ALL ENTRIES IN it1_bseg
WHERE belnr = it1_bseg-belnr AND
gjahr = it1_bseg-gjahr AND "changed it_bkpf to it1_bseg
bukrs = it1_bseg-bukrs .
LOOP AT it_bseg.
it_bseg-wrbtr = it_bseg-wrbtr * -1.
it_bseg-fwbas = it_bseg-fwbas * -1.
it_bseg-pswbt = it_bseg-pswbt * -1.
it_bseg-flag_21 = 'X'.
MODIFY it_bseg.
CLEAR it_bseg.
ENDLOOP.
SELECT name1 ktokk werks lifnr FROM lfa1 INTO
TABLE it_lfa2 FOR ALL ENTRIES IN it1_bseg
WHERE lifnr = it1_bseg-lifnr.
ENDIF.
REFRESH it1_bseg.
SELECT bukrs belnr gjahr buzei bschl fwbas pswbt hkont wrbtr ktosl koart shkzg mwskz qsskz dmbtr lifnr matnr
FROM bseg INTO TABLE it1_bseg FOR ALL ENTRIES IN it_bkpf
WHERE belnr = it_bkpf-belnr AND
gjahr = it_bkpf-gjahr AND
bukrs = it_bkpf-bukrs AND
( bschl = '31' ) AND "added bschl and lifnr by vincy
lifnr IN s_lifnr.
IF it1_bseg[] IS NOT INITIAL.
SELECT name1 ktokk werks lifnr FROM lfa1 APPENDING
TABLE it_lfa2 FOR ALL ENTRIES IN it1_bseg
WHERE lifnr = it1_bseg-lifnr.
SELECT bukrs belnr gjahr buzei bschl fwbas pswbt hkont wrbtr ktosl koart shkzg mwskz qsskz dmbtr lifnr matnr
FROM bseg APPENDING TABLE it_bseg FOR ALL ENTRIES IN it1_bseg
WHERE belnr = it1_bseg-belnr AND
gjahr = it1_bseg-gjahr AND "changed it_bkpf to it1_bseg
bukrs = it1_bseg-bukrs AND
bschl <> '35'. "added bschl to avoid vendor paymnt
ENDIF.
SELECT bukrs belnr gjahr buzei bschl fwbas pswbt hkont wrbtr ktosl koart shkzg mwskz qsskz dmbtr lifnr
FROM bseg APPENDING CORRESPONDING FIELDS OF TABLE it_bseg
FOR ALL ENTRIES IN it_bkpf
WHERE belnr = it_bkpf-belnr AND
gjahr = it_bkpf-gjahr AND
lifnr IN s_lifnr AND
bukrs = it_bkpf-bukrs AND qsskz IN ('WI', 'WJ').
ENDIF.
ENDIF.
SORT it_bseg BY belnr buzei.
IF NOT it_bseg[] IS INITIAL.
SELECT saknr spras txt50 FROM skat
INTO TABLE iskat
FOR ALL ENTRIES IN it_bseg
WHERE saknr = it_bseg-hkont AND spras = 'EN'.
SELECT bukrs hkont augdt augbl zuonr gjahr belnr buzei budat qsskz FROM bsis
INTO TABLE zbsis
FOR ALL ENTRIES IN it_bseg
WHERE bukrs = 'MU51' AND hkont = it_bseg-hkont
AND belnr = it_bseg-belnr AND gjahr = s_fiscal
AND budat IN s_budat1.
ENDIF.
LOOP AT it_bseg.
READ TABLE zbsis WITH KEY hkont = it_bseg-hkont.
IF sy-subrc = 0.
it_bseg-qsskz = zbsis-qsskz.
MODIFY it_bseg.
ENDIF.
CLEAR: it_bseg,zbsis.
ENDLOOP.
LOOP AT zt059z.
LOOP AT it_bseg WHERE qsskz = zt059z-wt_withcd.
zt059z-hkont = it_bseg-hkont.
zt059z-belnr = it_bseg-belnr.
MODIFY zt059z.
CLEAR: it_bseg,zt059z.
ENDLOOP.
ENDLOOP.
CLEAR: wa_bkpf.
*******Filling Wa.
LOOP AT it_bkpf INTO wa_bkpf. "changes by vincy on 14.04.2008
LOOP AT it1_ekbe INTO wa1_ekbe .
READ TABLE it_bkpf INTO wa_bkpf
WITH KEY awkey = wa1_ekbe-awkey.
wa_tax-belnr = wa_bkpf-belnr.
wa_tax-gjahr = wa_bkpf-gjahr.
wa_tax-bukrs = wa_bkpf-bukrs.
wa_tax-awkey = wa_bkpf-awkey.
wa_tax-ebelp = wa1_ekbe-ebelp.
CLEAR: wa_bseg,wa_skat.
READ TABLE it_bseg WITH KEY bukrs = wa_bkpf-bukrs
belnr = wa_bkpf-belnr
gjahr = wa_bkpf-gjahr INTO wa_bseg.
IF sy-subrc = 0.
wa_tax-fi_docno = wa_bseg-belnr.
wa_tax-mwskz = wa_bseg-mwskz.
CLEAR: wa_bseg.
READ TABLE it_bseg WITH KEY bukrs = wa_bkpf-bukrs
belnr = wa_bkpf-belnr
gjahr = wa_bkpf-gjahr
flag = ''
ktosl = 'JP4' INTO wa_bseg.
IF sy-subrc = 0.
wa_bseg-flag = 'X'.
MODIFY it_bseg INDEX sy-tabix FROM wa_bseg.
wa_tax-gl_accnt = wa_bseg-hkont.
READ TABLE iskat INTO wa_skat WITH KEY saknr = wa_bseg-hkont.
IF sy-subrc = 0.
wa_tax-gl_desc = wa_skat-txt50.
ENDIF.
wa_tax-set_off = wa_bseg-wrbtr.
wa_tax-fwbas = wa_bseg-fwbas.
wa_tax-cst_amt = wa_bseg-pswbt.
wa_tax-description = 'CST CG Sett off'.
wa_tax-cond_type = 'JVCS'.
ENDIF.
READ TABLE it_bseg WITH KEY bukrs = wa_bkpf-bukrs
belnr = wa_bkpf-belnr
gjahr = wa_bkpf-gjahr
flag = ''
ktosl = 'VS1' INTO wa_bseg.
IF sy-subrc = 0.
wa_bseg-flag = 'X'.
MODIFY it_bseg INDEX sy-tabix FROM wa_bseg.
wa_tax-fwbas = wa_bseg-fwbas.
ENDIF.
READ TABLE it_bseg WITH KEY bukrs = wa_bkpf-bukrs
belnr = wa_bkpf-belnr
gjahr = wa_bkpf-gjahr
flag = ''
ktosl = 'JP7' INTO wa_bseg.
IF sy-subrc = 0.
wa_bseg-flag = 'X'.
MODIFY it_bseg INDEX sy-tabix FROM wa_bseg.
wa_tax-gl_accnt = wa_bseg-hkont.
READ TABLE iskat INTO wa_skat WITH KEY saknr = wa_bseg-hkont.
IF sy-subrc = 0.
wa_tax-gl_desc = wa_skat-txt50.
ENDIF.
wa_tax-set_off = wa_bseg-wrbtr.
wa_tax-fwbas = wa_bseg-fwbas.
wa_tax-vat_amt = wa_bseg-pswbt.
wa_tax-description = 'VAT CG Sett off'.
wa_tax-cond_type = 'JVCD'.
ENDIF.
CLEAR wa_bseg.
READ TABLE it_bseg WITH KEY bukrs = wa_bkpf-bukrs
belnr = wa_bkpf-belnr
gjahr = wa_bkpf-gjahr
flag = ''
ktosl = 'JP5' INTO wa_bseg.
READ TABLE it_bseg WITH KEY bukrs = wa_bkpf-bukrs
belnr = wa_bkpf-belnr
gjahr = wa_bkpf-gjahr
hkont = '0002868001' INTO wa_bseg. "vat changed for V0 tax code
IF sy-subrc = 0.
wa_bseg-flag = 'X'.
MODIFY it_bseg INDEX sy-tabix FROM wa_bseg.
wa_tax-gl_accnt = wa_bseg-hkont.
READ TABLE iskat INTO wa_skat WITH KEY saknr = wa_bseg-hkont.
IF sy-subrc = 0.
wa_tax-gl_desc = wa_skat-txt50.
ENDIF.
wa_tax-vat_amt = wa_bseg-pswbt.
wa_tax-set_off = wa_bseg-wrbtr.
wa_tax-cond_type = 'JVRD'.
wa_tax-fwbas = wa_bseg-fwbas.
wa_tax-description = 'VAT RM Set off'.
ENDIF.
CLEAR: wa_bseg,wa_skat.
READ TABLE it_bseg WITH KEY bukrs = wa_bkpf-bukrs
belnr = wa_bkpf-belnr
gjahr = wa_bkpf-gjahr
shkzg = 'H'
koart = 'K'
INTO wa_bseg.
IF sy-subrc = 0.
wa_tax-total_value = wa_bseg-wrbtr.
ENDIF.
START OF MODIFICATION BY ASHOK.CH ON 08.02.2008
service_tax
CLEAR wa_bseg.
READ TABLE it_bseg WITH KEY bukrs = wa_bkpf-bukrs
belnr = wa_bkpf-belnr
gjahr = wa_bkpf-gjahr
flag = ''
ktosl = 'VS8' INTO wa_bseg.
IF sy-subrc = 0.
wa_bseg-flag = 'X'.
MODIFY it_bseg INDEX sy-tabix FROM wa_bseg.
wa_tax-gl_accnt = wa_bseg-hkont.
READ TABLE iskat INTO wa_skat WITH KEY saknr = wa_bseg-hkont.
IF sy-subrc = 0.
wa_tax-gl_desc = wa_skat-txt50.
ENDIF.
wa_tax-service_tax = wa_bseg-wrbtr.
wa_tax-description = 'Service Tax'.
wa_tax-cond_type = 'JSRT'.
ENDIF.
service_ecess
CLEAR: wa_bseg,wa_skat.
READ TABLE it_bseg WITH KEY bukrs = wa_bkpf-bukrs
belnr = wa_bkpf-belnr
gjahr = wa_bkpf-gjahr
flag = ''
ktosl = 'VS9' INTO wa_bseg.
IF sy-subrc = 0.
wa_bseg-flag = 'X'.
MODIFY it_bseg INDEX sy-tabix FROM wa_bseg.
wa_tax-service_ecess = wa_bseg-wrbtr.
ENDIF.
**********changes by vincy on 31.01.08*********************
service_shcess
CLEAR: wa_bseg.
READ TABLE it_bseg WITH KEY bukrs = wa_bkpf-bukrs
belnr = wa_bkpf-belnr
gjahr = wa_bkpf-gjahr
flag = ''
ktosl = 'VSE' INTO wa_bseg.
IF sy-subrc = 0.
wa_bseg-flag = 'X'.
MODIFY it_bseg INDEX sy-tabix FROM wa_bseg.
wa_tax-service_shcess = wa_bseg-wrbtr.
ENDIF.
*************************end of changes***********************
END OF MODIFICATION ON 08.02.2008
APPEND wa_tax TO it_tax.
ENDIF.
CLEAR :wa_tax,wa_bseg,wa_bkpf,wa_skat.
ENDLOOP.
CLEAR wa1_ekbe.
LOOP AT it1_ekbe INTO wa1_ekbe.
READ TABLE it_j_1iexcdtl INTO wa_j_1iexcdtl
WITH KEY rdoc1 = wa1_ekbe-ebeln
ritem1 = wa1_ekbe-ebelp.
*New query added by Nilesh
READ TABLE it_j_1iexcdtl INTO wa_j_1iexcdtl
WITH KEY rdoc1 = wa1_ekbe-lfbnr
ritem2 = wa1_ekbe-lfpos.
READ TABLE it_bkpf INTO wa_bkpf
WITH KEY awkey = wa1_ekbe-awkey.
IF sy-subrc = 0.
READ TABLE it_bseg WITH KEY bukrs = wa_bkpf-bukrs
belnr = wa_bkpf-belnr
gjahr = wa_bkpf-gjahr.
IF sy-subrc = 0.
wa_ekexclf-belnr = wa1_ekbe-belnr.
wa_ekexclf-budat = wa1_ekbe-budat.
wa_ekexclf-menge = wa1_ekbe-menge.
wa_ekexclf-ebelp = wa1_ekbe-ebelp.
wa_ekexclf-ebeln = wa1_ekbe-ebeln.
wa_ekexclf-gjahr = wa1_ekbe-gjahr.
wa_ekexclf-awkey = wa1_ekbe-awkey.
wa_ekexclf-lifnr = it_bseg-lifnr.
wa_ekexclf-matnr = it_bseg-matnr .
READ TABLE it_j_1iexcdtl INTO wa_j_1iexcdtl "for records for which either rdoc1 or matnr
WITH KEY rdoc2 = wa1_ekbe-lfbnr "not maintained in ekbe by vincy on 16.06.08
menge = wa1_ekbe-menge.
IF sy-subrc <> 0 .
READ TABLE it_j_1iexcdtl INTO wa_j_1iexcdtl
WITH KEY rdoc1 = wa1_ekbe-ebeln
exdat = wa1_ekbe-bldat
matnr = wa1_ekbe-matnr
menge = wa1_ekbe-menge.
ENDIF.
READ TABLE it_j_1iexcdtl INTO wa_j_1iexcdtl
WITH KEY rdoc1 = wa1_ekbe-ebeln
ritem1 = wa1_ekbe-ebelp.
IF sy-subrc = 0.
wa_ekexclf-belnr = wa1_ekbe-belnr.
wa_ekexclf-budat = wa1_ekbe-budat.
wa_ekexclf-menge = wa1_ekbe-menge.
wa_ekexclf-ebelp = wa1_ekbe-ebelp.
wa_ekexclf-ebeln = wa1_ekbe-ebeln.
wa_ekexclf-gjahr = wa1_ekbe-gjahr.
wa_ekexclf-awkey = wa1_ekbe-awkey.
wa_ekexclf-exnum = wa_j_1iexcdtl-exnum.
wa_ekexclf-exdat = wa_j_1iexcdtl-exdat.
wa_ekexclf-lifnr = wa_j_1iexcdtl-lifnr.
wa_ekexclf-matnr = wa_j_1iexcdtl-matnr .
wa_ekexclf-maktx = wa_j_1iexcdtl-maktx .
wa_ekexclf-capind = wa_j_1iexcdtl-capind.
wa_ekexclf-exbas = wa_j_1iexcdtl-exbas.
wa_ekexclf-exbed = wa_j_1iexcdtl-exbed.
wa_ekexclf-ecs = wa_j_1iexcdtl-ecs.
wa_ekexclf-werks = wa_j_1iexcdtl-werks.
wa_ekexclf-ritem1 = wa_j_1iexcdtl-ritem1.
wa_ekexclf-rdoc1 = wa_j_1iexcdtl-rdoc1.
wa_ekexclf-docyr = wa_j_1iexcdtl-docyr.
wa_ekexclf-exaddtax1 = wa_j_1iexcdtl-exaddtax1.
IF it_bseg-flag_21 = 'X'.
wa_ekexclf-exbas = wa_ekexclf-exbas * -1.
ENDIF.
MODIFIED BY ASHOK.CH ON 08.03.2008
IF wa_j_1iexcdtl-WERKS NE 'RD01' .
wa_ekexclf-exbed = wa_j_1iexcdtl-exbed.
wa_ekexclf-ecs = wa_j_1iexcdtl-ecs.
wa_ekexclf-exaddtax1 = wa_j_1iexcdtl-exaddtax1.
IF it_bseg-flag_21 = 'X'.
wa_ekexclf-exbed = wa_ekexclf-exbed * -1.
wa_ekexclf-ecs = wa_ekexclf-ecs * -1.
wa_ekexclf-exaddtax1 = wa_ekexclf-exaddtax1 * -1.
ENDIF.
ELSE.
wa_ekexclf-exbed = wa_j_1iexcdtl-BEDINV.
wa_ekexclf-ecs = wa_j_1iexcdtl-ecsINV.
wa_ekexclf-exaddtax1 = wa_j_1iexcdtl-exaddINV1.
ENDIF.
END IF MODIFICATION ON 08.03.2008
APPEND wa_ekexclf TO it_ekexclf.
CLEAR :wa_lfa1,wa_j_1iexcdtl,wa1_ekbe.
ENDIF.
READ TABLE it_lfa2 INTO wa_lfa2
WITH KEY lifnr = wa_ekexclf-lifnr.
IF sy-subrc = 0.
wa_ekexclf-name1 = wa_lfa2-name1.
wa_ekexclf-ktokk = wa_lfa2-ktokk.
ENDIF.
APPEND wa_ekexclf TO it_ekexclf.
ENDIF.
ENDIF.
CLEAR :wa_lfa1,wa_j_1iexcdtl,wa1_ekbe,wa_lfa2,wa_ekexclf.
ENDLOOP.
CLEAR wa_ekexclf.
LOOP AT it_ekexclf INTO wa_ekexclf.
wa_final-belnr = wa_ekexclf-belnr.
wa_final-budat = wa_ekexclf-budat.
wa_final-menge = wa_ekexclf-menge.
wa_final-ebelp = wa_ekexclf-ebelp.
wa_final-ebeln = wa_ekexclf-ebeln.
wa_final-gjahr = wa_ekexclf-gjahr.
wa_final-awkey = wa_ekexclf-awkey.
wa_final-exnum = wa_ekexclf-exnum.
wa_final-exdat = wa_ekexclf-exdat.
wa_final-lifnr = wa_ekexclf-lifnr.
wa_final-matnr = wa_ekexclf-matnr .
wa_final-maktx = wa_ekexclf-maktx .
wa_final-shcess_amt = wa_ekexclf-exaddtax1.
IF wa_ekexclf-capind = 'C'.
wa_final-capind = 'Consumables'.
ENDIF.
IF wa_ekexclf-capind = 'A'.
wa_final-capind = 'Assets'.
ENDIF.
IF wa_ekexclf-capind = 'T'.
wa_final-capind = 'Tools'.
ENDIF.
IF wa_ekexclf-capind = ''.
wa_final-capind = 'Raw Material'.
ENDIF.
IF wa_ekexclf-capind = 'N'.
wa_final-capind = 'Non Cenvatable'.
ENDIF.
IF wa_ekexclf-capind NE 'C' AND wa_ekexclf-capind NE 'A' AND
wa_ekexclf-capind NE '' AND wa_ekexclf-capind NE 'N'.
wa_final-capind = wa_ekexclf-capind.
ENDIF.
wa_final-exbas = wa_ekexclf-exbas.
wa_final-exbed = wa_ekexclf-exbed.
wa_final-ecs = wa_ekexclf-ecs.
wa_final-werks = wa_ekexclf-werks.
wa_final-ritem1 = wa_ekexclf-ritem1.
wa_final-rdoc1 = wa_ekexclf-rdoc1.
wa_final-docyr = wa_ekexclf-docyr.
wa_final-name1 = wa_ekexclf-name1.
wa_final-ktokk = wa_ekexclf-ktokk.
wa_final-excise = wa_final-exbas + wa_final-exbed + wa_final-ecs + wa_final-shcess_amt.
CLEAR :wa_tax.Hi ,
I think you are using the redundant selects to fetch the data from BSEG.
First select all the data into an internal table based on bkpf.
Now you can distribute the data into whatever tables you want using the loop,read-binary search and append statements..
Loop at it_bseg.
read it_bseg where
xxxxx
xxxxx
binary search.
append wa to it2_bseg.
endloop
This avoid several database fetches..
Thank you.. -
Two finger swipe replaces google search string
MBP with Safari 6.0 experiencing this problem. Another user was experiencing the issue here:
http://www.ehmac.ca/mac-iphone-ipad-ipod-help-troubleshooting/99937-safari-two-f inger-swipe-bug-replaces-google-search-string-os-10-7-3-a.html
I don't know where the bug reports are to follow up on it and I haven't seen any patches for it. Any advice? Specifically, I'd like to know how to file the bug (in case I find another) and to follow up on any existing issues.
TIA,
ScottIs there no place to track the status of the report or see any other outstanding issues so I don't bother filing duplicates?
Never heard of such a function here. This method gets feedback to the people who count but it is completely behind the scenes. Part of Apple's "cards close to the chest" method of doing pretty much everything. You should have been looking at the "don't expect a response" screen after you hit the submit button on your bug report.
If there is something that needs clarification, I suspect they will use e-mail to ask for it, but don't stay home waiting!
Have you read Walter Isaacson's biography of Steve Jobs? Things like this took on a new--if not satisfying--perspective for me after reading it. So far, it has persisted in their corporate culture in the after-Steve era.. -
Little problem with Strings.
I have an little problem with Strings, i make one comparision like this.
String nombre="Javier";
if( nombre.equalsIgnoreCase(output.getStringValue("CN_NOMBRESf",null)) )
Wich output.getStringValue("CN_NOMBRESf",null) is "Javier" too, because I display
this before and are equals.
What I do wrong?.
You are actually making your users key in things like
"\026"? Not very user-friendly, I would say. But
assuming that is the best way for you to get your
input, or if it's just you doing the input, the way to
change that 4-character string into the single
character that Java represents by '\026', you would
use a bit of code like this:char encoded =
(char)Integer.parseInt(substring(inputString, 1),
16);
DrClap has the right idea, except '\026' is octal, not hex. So change the radix from 16 to 8. Unicode is usually represented like '\u002A'. So it looks like you want:String s = "\\077";
System.out.println((char)Integer.parseInt(s.substring(1), 8));Now all you have to do is parse through the String and replace them, which I think shouldn't be too hard for you now :) -
Hi All,
String strValue = "ABC TPT 0694";
My String is as shown above, I am looking for a way to replace char at byte 6 (position 6) with another Char in String.
For example at location 6 it is "T" I want to replace it with char "O". can any one tell me how to do thisString strValue = "ABC TPT 0694";
char[] chars = strValue.toCharArray();
chars[5] = 'O';
strValue = String.valueOf(chars); -
Replace the connection string in Excel MDS file
I had MDS solution from one SQL Server 2012 to another - SQL Server 2014. I have configured Excel file with connection to MDS. How can I safely to replace the connection string in my Excel MDS file and the tables is not broken?
from Moscow with moneyHi,
Excel is just used to manage data and create new entities and attributes. Why not first publish and close your excel before MDS upgraded to 2014? After the upgrade, reconnect new solution in your excel.
thanks,
Jerry -
Replace taglib with normal call
Hi all,
Can someone tell me if it is possible to replace a call like
<jbo:ShowValue datasource="dsNews" dataitem="NisStory" /> with
String s = jbo.ShowValue(dsNews,NisStory)? Or if there is another way to get the output of the tag into a String?
Thanks in advance.
Regards BasHi all,
Can someone tell me if it is possible to replace a
call like
<jbo:ShowValue datasource="dsNews"
dataitem="NisStory" /> with
String s = jbo.ShowValue(dsNews,NisStory)? Or if there
is another way to get the output of the tag into a
String?One way to do it would be to wrap the execution of <jbo:ShowValue/> with a body tag that captures its body and writes it to a variable in the pageContext. The usage would be something like:
<mytaglib:capture var="aString">
<jbo:ShowValue/>
</mytaglib:capture>
the capture tag handler would take the body content in the doAfterBody callback and expose it as "aString" in the pageContext attributes.
>
Thanks in advance.
Regards BasBr - J -
Hi, I am not able to remove " (double quotes) from a sting.
I am using replace function in webi but getting error.
example sting: Yellow stone"discovery"
i have tried like this: =replace([varible];""";"") but getting error. can anybody help me in removing the " from sting.
Thanks.Description
Replaces part of a string with another string
Function Group
Character
Syntax
string Replace(string input_string; string string_to_replace; string replace_with)
EX:=Replace ([[variable]]; Char(34) ;"")
Input
input_string The input string
string_to_replace The string within input_string to be replaced
replace_with The string to replace string_to_replace with.
Output
The string with the part replaced
Example
Replace ("New YORK";"ORK";"ork") returns "New York"
All the best,
Praveen -
Replace all ', , ' inside string
i have long string and with pl/sql i want to replace all ', ,' with ', null,'.
I can use replace function like:
prepare_insert := replace(prepare_insert,', ,',', null,');
but it will only replace first ', ,' not all. How can i replace all?5th database commandment:
Thou shalt not create dynamic insert statements!
I think using bind variables or the using clause in the execute immediate statement would solve the problem.
But of cause you can do it also the hard (and slow) way.
The problem is that your search string is not correct. It does include a leading "," and leaving ",". However if the leavaing "," is also the leading "," of the next replacement part then the function can't take this into account.
Solution 1) Take care of this while building the string in the first place.
While concating the pieces togeather use NVL(value,'null'). If you are sure that there s no value, then write NULL.
Solution 2) Use a double replace
with testdata as (select 'Test, , , , ''ABC''' txt from dual union all
select 'Test2, , , ''ABC''' txt from dual
select txt
,replace(replace(txt,', ,',',null,'),', ,',',null,')
from testdata;
TXT REPLACE
Test, , , , 'ABC' Test,null,null,null, 'ABC'
Test2, , , 'ABC' Test2,null,null, 'ABC'
Maybe you are looking for
-
Is it possible to make/get a scrolling list in Muse?
So I have been trying all types of built in widget combining and online searching and am unable to find out how to make a scrollable content area. I want to make a a content area that is 300X600px and has 3 Tabs or something similar at the top. Insid
-
IPhoto Transfer to External Hard Drive
I'm trying to export about 10000 pics and vids from iphoto to an external hard drive. Each time I try about 500 files won't copy and I get an error message for each. Short of copy down each file and moving them over separately, is there something el
-
Email address worng in apps but right @ store
help email address worng in apps but right @ store
-
How to programmatically bring focus to a component
How can i programmatically bring focus to a component
-
I find myself emailing photos out of iPhoto fairly regularly. Usually a few at a time (3 - 30). Is there a way to have the photos load into the email other than inline? I would like to get iPhoto to process the photos in to a folder for attachment to