Problem in Script Perform
Hi,
I have to add 3 values for this i have written a perform in text element of main window as follows.
/: DEFINE &DO_TOT& := '0'.
/: PERFORM DO_TOTAL IN PROGRAM Z_1IEXCP_OUTPUT
/: USING &J_1IEXCHDR-EXBED&
/: USING &J_1IEXCHDR-ECS&
/: USING &J_1IEXCHDR-EXADDTAX1&
/: CHANGING &DO_TOT&
and in print program i have written the code as follows
FORM DO_TOTAL TABLES IN_VAR
OUT_VAR.
DATA : IN_VAR1 TYPE STANDARD TABLE OF ITCSY WITH HEADER LINE,
OUT_VAR1 TYPE STANDARD TABLE OF ITCSY WITH HEADER LINE.
DATA : VAL1 TYPE I ,
VAL2 TYPE I,
VAL3 TYPE I.
IN_VAR1[] = IN_VAR[].
OUT_VAR1[] = OUT_VAR[].
READ TABLE IN_VAR1 WITH KEY NAME = 'J_1IEXCHDR-EXBED'.
VAL1 = IN_VAR1-VALUE.
CALL FUNCTION 'CHAR_NUMC_CONVERSION'
EXPORTING
INPUT = IN_VAR1-VALUE
IMPORTING
NUMCSTR = VAL1.
READ TABLE IN_VAR1 WITH KEY NAME = 'J_1IEXCHDR-ECS'.
CALL FUNCTION 'CHAR_NUMC_CONVERSION'
EXPORTING
INPUT = IN_VAR1-VALUE
IMPORTING
NUMCSTR = VAL2.
READ TABLE IN_VAR1 WITH KEY NAME ='J_1IEXCHDR-EXADDTAX1'.
CALL FUNCTION 'CHAR_NUMC_CONVERSION'
EXPORTING
INPUT = IN_VAR1-VALUE
IMPORTING
NUMCSTR = VAL3.
DATA X TYPE I.
DATA C_X(255) TYPE C.
X = VAL1 + VAL2 + VAL3.
C_X = X.
OUT_VAR1-VALUE = C_X.
OUT_VAR[] = OUT_VAR1[].
ENDFORM.
but I am not getting the values into &DO_TOT&
can you please correct the error. its urgent
Thanks in advance
HI,
<b>I CORRECTED YOUR MISTAKES. JUST COPY AND PASTE</b>
FORM DO_TOTAL TABLES IN_VAR structure itcsy
OUT_VAR structure itcsy.
DATA : VAL1 TYPE I ,
VAL2 TYPE I,
VAL3 TYPE I.
DATA X TYPE I.
DATA C_X(255) TYPE C.
constants : c_cons1(16) type c value 'J_1IEXCHDR-EXBED',
c_cons2(15) type c value 'J_1IEXCHDR-ECS',
c_cons3(21) type c value 'J_1IEXCHDR-EXADDTAX1',
c_cons4(6) TYPE c VALUE 'DO_TOT'.
READ TABLE IN_VAR WITH KEY c_cons1.
if sy-subrc = 0.
VAL1 = IN_VAR-VALUE.
CALL FUNCTION 'CHAR_NUMC_CONVERSION'
EXPORTING
INPUT = VAL1
IMPORTING
NUMCSTR = VAL1.
endif .
READ TABLE IN_VAR WITH KEY c_cons2.
if sy-subrc = 0.
VAL2 = IN_VAR-VALUE.
CALL FUNCTION 'CHAR_NUMC_CONVERSION'
EXPORTING
INPUT = VAL2
IMPORTING
NUMCSTR = VAL2.
endif .
READ TABLE IN_VAR WITH KEY c_cons3.
if sy-subrc = 0.
VAL3 = IN_VAR-VALUE.
CALL FUNCTION 'CHAR_NUMC_CONVERSION'
EXPORTING
INPUT = VAL3
IMPORTING
NUMCSTR = VAL3.
endif .
X = VAL1 + VAL2 + VAL3.
C_X = X.
read table out_var with key c_cons4. "#EC *
if sy-subrc = 0.
OUT_VAR-VALUE = C_X.
endif.
ENDFORM.
Regards,
Sooness
Similar Messages
-
Will block size effect the calc script performance?
Hi Experts,
I have a cube called RCI_LA:RCI_LA, now I have created calc scripts and working fine. But those calc scripts are taking too much time than expected (normally it should not take more than 15 min but those are taking nearly 1 hr or more some calc scripts.)
In database properties I found that block size is 155896 B i.e. 152.KB but this size should be 8 to 100 KB & Block density is 0.72%
If block size exceeds more than 100 KB will it impact the performance of Calc scripts?
I think answer to the above question is “yes”. In this case what should I need to do to improve calc scripts performance?
Could you please share your experience here with me to come out of this problem?
Thanks in advance.
RamI believe Sandeep was trying to say "Dynamic" rather than "Intelligent".
The ideal block size is a factor in all calcs, but the contributing reasons are many (The main three are CPU caching, Data I/O overhead, Index I/O overhead).
Generally speaking, the ideal block size is achieved when you can minimize the combination of Data I/O overhead and Index I/O overhead. For this reason a block size that is too large will incur too much Data I/O, while a block size that is too small will incur too much Index I/O. If your Index file is small, increasing your block size may help, although the commonly acceptible block size is between 8K and 64K in size, this is just a guideline.
In other words, if you test it with something right in the middle and your index file is tiny, you might want to test it with a smaller block size. If your index file is very large (i.e. 400 MB or more), you may want to increase the block size and retest.
Ways to increase/decrease it are also many. Obviously, changing the dense/sparse settings is the main way, but there are some considerations that make this a touchy process. Other ways are to use dynamic calc in the dense dimensions. I say start at the top of your smallest dense dimension and keep the number of DIMENSIONS that you use D-C on limited. Using D-C members in a dense dimension does NOT increase the index file, so it could be considered a "free" reduction in block size -- the penulty is paid on the retrieve side (there is no free ride). -
Syntax problem with BDC perform
Dear Friends,
small problem in BDC Perform syntax but I am not getting how to do this..
I have writen the code like this in my BDC byt its throughing the error...Here I want to do the validation on each and every field. I mean If that field values are empty i don't want to change the SAP field value.
my code is like this.
PERFORM dynpro USING:
'X' 'SAPLMGMM' '0080'.
IF NOT p_int_matl-werks IS INITIAL.
' ' 'RMMG1-WERKS' p_int_matl-werks.
ENDIF.
IF NOT p_int_matl-werks IS INITIAL.
' ' 'RMMG1-LGORT' p_int_matl-lgort.
ENDIF.
' ' 'BDC_OKCODE' '/00'.
pls give me exact code how to do this...
Thanks
SridharHi sridher,
1. this kind of syntax ie. IF will give error.
2. If ur requirement is : blank value should not be put in bdc,
3. then one way is to change / write the logic
inside the form itself.
4. ie. inside the routine/form DYNPRO.
5. So, it will be then general for all performs.
regards,
amit m. -
hi,
i am having problem in script , the problem is
s.no| descriptio | UOM | Qty | Rate | AMT |
01 aaaaaaaaaaaaaaaaaaaaa 11.01 17.28 170000000 2400000
this is fine but when the 1st column is shot other also get affected.
s.no| descriptio | UOM | Qty | Rate | AMT |
01 aa 11.01 17.28 170000000 2400000
and i cannot draw vertical line here .what is the solution for this.
Edited by: jaihind on Mar 6, 2010 12:21 PM
hi,
problem is if the description field is long then other coloum are comming fine but if description caloumn is small then other also get affected and its comes towards left .
Edited by: jaihind on Mar 6, 2010 12:22 PMHi
For this u can resolve by using the Formatting characters ......
This is your layout ..
s.no| descriptio | UOM | Qty | Rate | AMT |
01 aaaaaaaaaaaaaaaaaaaaa 11.01 17.28 170000000 2400000
Assume that your field names like
s.no | description | UOM | Qty | Rate | AMT |
&sno& &desc& &UOM& &Qty& &rate& &AMT&
asseme that length of these fields(in characters) as per your requirement will be ...
s.no | description | UOM | Qty | Rate | AMT |
8 15 5 8 10 15
For these use formatting characters like ...
s.no | description | UOM | Qty | Rate | AMT |
1stLine &sno& ,, &desc+0(15)&,, &UOM& &Qty& &rate& &AMT&
2ndline &desc+15(15)&
&desc+0(15)& - it will print first 15 characters from 0th position
&desc+15(15)&- From 15th position it will print 15 characters ..
Hope you resolve your issue
Let me know if Any concerns,....... -
Outline Order, Calc Script Performance, Substitution Variables
Hi All,
I am currently looking in to the performance side.
This is mainly about the calculation script performance.
There are lot of questions in my mind and as it is said you can get the results only by testing.
1. Outline order should be from least sparse to most sparse
(other reason : to accomodate as many sparse members in to calculator cache) correct me if I am wrong
2. Is Index entry created based on the outline order. For example I have outline order as Scenarios, Products, Markets then does my index entry be like scenario -> Products -> Markets ?
3. Does this order has to match with the order of members in FIX Statement of calculation script?
4. I have 3 sparse dimensions. P (150 members), M (8 members), V (20 members).
I use substitution variables for these three in the calculation script. And these three are the mandotary things in my calculation script. Now when I see the fix statement, these three are the first 3 parameters of the fix statemtn and since I am fixing on a specific member, placing these three members as the first 3 sparse dimensions in the outline, ill it improve performance?
In one way, I can say that a member from P, M,V becomes my key for the data.
Theoritically if I think, may be it will...but in practical terms I don't see any of such thing.. Correct me If my thinking is wrong.
One more thing, I have a calc script with say around 10 FIX statements and this P,M,V is being used in every FIX statemnts. Since my entire calculation will be only on one P, one M, one V. Can I put everything in one FIX at the beginning and exclude it from remaining FIX statememts?
5. I have a lot of cross dimensional operations in my calc scripts for accounts dimension (500 + ) members.
Is there a way to reduce these?
6. My cube statistics..
Cube size : 80 GB +
Block Size : 18 KB (Approx)
Block density : 0.03 . This is what I am more worried about. This really hurts me.
This is one of the reason why my calculation time is > 7 hours and some times it is horrible when there is huge amount of data (it takes aound 20 + hours) for calculation.
I would be looking forward for your suggestions.
It would be really apprecialble if It is Ok to share your contact number so that I can get in touch with you. That could be of great help from your side.I have provided some answers below:
There are lot of questions in my mind and as it is said you can get the results only by testing.
----------------------------You are absolutely right here but it helps to understand the underlying principles and best practices as you seem to understand.
1. Outline order should be from least sparse to most sparse
(other reason : to accomodate as many sparse members in to calculator cache) correct me if I am wrong
----------------------------This is one reason but another is to manage disk I/O during calculations. Especially when performing the intial calculation of a cube, the order of sparse dimensions from smallest to largest will measurably affect your calc times. There is another consideration here though. The smallest to largest (or least to most) sparse dimension argument assumes single threading of the calculations. You can gain improvements in calc time by multi-threading. Essbase will be able to make more effective use of multi-threading if the non-aggregating sparse dimensions are at the end of the outline.
2. Is Index entry created based on the outline order. For example I have outline order as Scenarios, Products, Markets then does my index entry be like scenario -> Products -> Markets ?
----------------------------Index entry or block numbering is indeed based on outline order. However, you do not have to put the members in a cross-dimensional expression in the same order.
3. Does this order has to match with the order of members in FIX Statement of calculation script?
----------------------------No it does not.
4. I have 3 sparse dimensions. P (150 members), M (8 members), V (20 members).
I use substitution variables for these three in the calculation script. And these three are the mandotary things in my calculation script. Now when I see the fix statement, these three are the first 3 parameters of the fix statemtn and since I am fixing on a specific member, placing these three members as the first 3 sparse dimensions in the outline, ill it improve performance?
--------------------------This will not necessarily improve performance in and of itself.
In one way, I can say that a member from P, M,V becomes my key for the data.
Theoritically if I think, may be it will...but in practical terms I don't see any of such thing.. Correct me If my thinking is wrong.
One more thing, I have a calc script with say around 10 FIX statements and this P,M,V is being used in every FIX statemnts. Since my entire calculation will be only on one P, one M, one V. Can I put everything in one FIX at the beginning and exclude it from remaining FIX statememts?
--------------------------You would be well advised to do this and it would almost certainly improve performance. WARNING: There may be a reason for the multiple fix statements. Each fix statement is one pass on all of the blocks of the cube. If the calculation requires certain operations to happen before others, you may have to live with the multiple fix statements. A common example of this would be calculating totals in one pass and then allocating those totals in another pass. The allocation often cannot properly happen in one pass.
5. I have a lot of cross dimensional operations in my calc scripts for accounts dimension (500 + ) members.
Is there a way to reduce these?
-------------------------Without knowing more about the application, there is no way of knowing. Knowledge is power. You may want to look into taking the Calculate Databases class. It is a two day class that could help you gain a better understanding of the underlying calculation principles of Essbase.
6. My cube statistics..
Cube size : 80 GB +
Block Size : 18 KB (Approx)
Block density : 0.03 . This is what I am more worried about. This really hurts me.
This is one of the reason why my calculation time is > 7 hours and some times it is horrible when there is huge amount of data (it takes aound 20 + hours) for calculation.
------------------------Your cube size is large and block density is quite low but there are too many other factors to consider to simply say that you should make changes based solely on these parameters. Too often we get focused on block density and ignore other factors. (To use an analogy from current events, this would be like making a decision on which car to buy solely based on gas mileage. You could do that but then how do you fit all four kids into the sub-compact you just bought?)
Hope this helps.
Brian -
In form i have given PERFORM form in PROGRAM prog
using &EKPO-BRTWR&
changing &GV_NETPR&
endperform
in prog
form prog TABLES in_par STRUCTURE itcsy
out_par STRUCTURE itcsy.
***calculated gv_netpr
out_par-name = 'GV_NETPR'.
out_par-value = gv_netpr. --> tried commenting this line ..adding below loop
APPEND out_par.
LOOP AT OUT_PAR WHERE NAME EQ 'GV_NETPR'.
MOVE gv_netpr TO OUT_PAR-VALUE.
MODIFY OUT_PAR.
endloop.
both times the out_par-value is not getting populated with value in gv_netpr ..Pls HelpHi,
First thing that i observed is, the name of the FORM given in program is wrong when i check in calling the PERFORM in ur script, also dont declare with standard names (FORM as form name).
I dont understand why did u LOOP OUT_PAR table. U can directly Modify the table once u get Net price value.
In Script:
PERFORM cal_net_price in PROGRAM prog
using &EKPO-BRTWR&
changing &GV_NETPR&
endperform
In Program:
form cal_net_price TABLES in_par STRUCTURE itcsy
out_par STRUCTURE itcsy.
***calculated gv_netpr
out_par-name = 'GV_NETPR'.
out_par-value = gv_netpr.
MODIFY out_par INDEX 1.
it will automatically updates the Internal table...
Hope it helps!! -
Updated Illustrator CC to CC 2014, having problems with CC performance. Slow and does not quit. What can be causing the issue?
Hello, please checkout my post concerning lagging issues.
I've also provided a link to a video I've recorded showing the Illustrator behavior on my iMac 27"
Adobe Illustrator Cs6 Lagging Extremely Slow on Yosemite 27" iMac i7 late 2013 -
I have problems with the performance of the adjustment brush. It is a very bad workflow.
Had you specified you're on Windows, I wouldn't even have replied. I don't do windows.
Yes, it has been a waste of time for both you and me.
You don't even know how to ask a question properly and you want me to read the FAQs? Hah!
No one will take your word for "ACR latest version", and "PS CC latest VersionVersion [sic]", as many users believe they are fully updated when they are not. Exact version numbers are needed.
8 GB is considered the realistic minimum to run Photoshop CC, but it's far from optimal—on any platform. There are other factors that can be at play and which you don't specify, such as the space available on each of your hard drives, whether you have a physically separate, dedicated hard drive for Photoshop's scratch drive, what video card you have and how much VRAM does it have, what your graphics settings are in Photoshop's Preferences > Performance, etc.
That's why I had indicated a link for you to read:
Please read this FAQ for advice on how to ask your questions correctly for quicker and better answers:
http://forums.adobe.com/thread/419981?tstart=0
If you read that link in its entirety and provide the pertinent information, maybe some of the Windows experts will be able to help you out.
Now I'm out of here. -
Hi friends,
i am facing a problem in script. i have developed the form
and it is working fine .in print preview every thing seems to be ok.
when we try to take a print the right side characters are cutting down by 2
characters every time.
i have moved the content to left but the result is the same.
can any one tell me how to solve the issue.
Regards,
SrinivasHi,
Try to check the lenght of the field/var that you are printing.
change the alignment doesnt solve the problem.
Check in your code what is the lenght and if is the same in your form.
Sample:
&j_1bprnfli-cfop(4C)&
prints only 4 digits of the variable j_1bprnfli-cfop.
Regards.
Rodrigo Paisante -
Hi Guru's
I have a problem in script printing.
The quantity and netprice are printing incorrectly. i.e., quantity should print as 1.000 where as it is printing as 1,000 and net price is printing as 5,30 instead of 5.30.
I have checked in the owndata settings it is like 1,234,56.00.
I would like to know whether any settings will be there or i need to do any modificatione
Waiting for you reply.Hi!
Here you can find the SAPScript formatting options.
http://help.sap.com/saphelp_47x200/helpdata/en/d1/803411454211d189710000e8322d00/content.htm
If it is not good for you, you might code it in your printer program and put it into a character variable.
Regards
Tamá -
Scheduling a script performing database backup
I wrote a script performing a backup of all databases located on a SQL Server's instance using the Backup-SqlDatabase command. As a script from the Windows Powershell ISE it works fine. I am working on a Windows Server 2012
The next step is to schedule this from the Windows Task Scheduler. The Action program is PowerShell and the arguments is -command "& 'C:\folder\myscript.ps1'" and it doesn't work, the script appears to fire off but it doesn't
perform the backup. The error looks strange it looks like it can't connect to the SQL Instance, I tried a whole bunch of options I found googling around but none worked. What am I missing ?1) Using -File instead of -Command didn't work, it didn't even fire the script
2) I have got 'Run with the highest privileges' selected
3) The error
4) The script
# backup_AllDb.ps1
# Full backup for database for specified SQL instance
# Change log:
# July 3, 2012: Thomas LaRock, http://thomaslarock.com
# Initial Version
# Get the SQL Server instance name from the command line
# leaving $dest null will result in default backup path being used
param(
[string]$inst=$null,
[string]$dest=$null
# Load SMO assembly, and if we're running SQL 2008 DLLs load the SMOExtended and SQLWMIManagement libraries
$v = [System.Reflection.Assembly]::LoadWithPartialName( 'Microsoft.SqlServer.SMO')
if ((($v.FullName.Split(','))[1].Split('='))[1].Split('.')[0] -ne '9') {
[System.Reflection.Assembly]::LoadWithPartialName('Microsoft.SqlServer.SMOExtended') | out-null
[System.Reflection.Assembly]::LoadWithPartialName('Microsoft.SqlServer.SQLWMIManagement') | out-null
# Handle any errors that occur
Function Error_Handler {
Write-Host "Error Category: " + $error[0].CategoryInfo.Category
Write-Host " Error Object: " + $error[0].TargetObject
Write-Host " Error Message: " + $error[0].Exception.Message
Write-Host " Error Message: " + $error[0].FullyQualifiedErrorId
Trap {
# Handle the error
Error_Handler;
# End the script.
break
If ($inst -eq "")
{ $inst = "MYSERVERNAME\MYINSTANCE" };
$srv = new-object ('Microsoft.SqlServer.Management.Smo.Server') $inst
# If missing set default backup directory.
If ($dest -eq "")
{ $dest = "C:\SQLBackups" };
Write-Output ("Started at: " + (Get-Date -format yyyy-MM-dd-HH:mm:ss));
cd SQLSERVER:\SQL\$inst\Databases
#start full backups
foreach($database in (Get-ChildItem -Force)) {
$dbName = $database.Name
if ($dbName -ne "tempdb") {
$timestamp = Get-Date -Format MMddyyHHmm
$bakFile = $dest + "\" + $dbName + "_full_" + $timestamp + ".bak"
Backup-SqlDatabase -Database $dbName -Initialize -BackupFile $bakFile
Write-Output ("Finished at: " + (Get-Date -format yyyy-MM-dd-HH:mm:ss)); -
We are on NW 7.5. The following script performance is bad. If we run the script for a year, it takes more than an hour. Wondering the following script can be fine tuned to improve the performance. Any input appreciated.
*SELECT(%RD%,ID,ENTITY,FUNCTION="RD")
*SELECT(%PLM%,ID,ENTITY,FUNCTION="PLM")
*XDIM_MEMBERSET ENTITY = %RD%,%PLM%
*XDIM_MEMBERSET EXPENSEDETAIL = NO_EXP_DETAIL
*XDIM_MEMBERSET RPTCURRENCY = LC,USD
*XDIM_MEMBERSET DATASOURCE = INPUT
*XDIM_MEMBERSET ACCOUNT = ALLOC_RATE
*WHEN ACCOUNT
*IS ALLOC_RATE
*FOR %ACC1% = "100+ accounts listed here"
*REC(FACTOR=([ACCOUNT].[%ACC1%],[DATASOURCE].[TOTAL_ADJ],[EXPENSEDETAIL].[EXP_DETAIL],[PRODUCTLINE].[UNASSIGNED_PROJECT]),ACCOUNT = %ACC1%, DATASOURCE="AUTO")
*NEXT
*ENDWHEN
*COMMITThis line is wrong:
Mkdir C:\temp\ADPERF\Lsass-Log.blg
It should be:
Mkdir C:\temp\ADPERF
output looks like this:
PS C:\scripts> dir C:\temp\ADPERF
Directory: C:\temp\ADPERF
Mode LastWriteTime Length Name
d---- 1/15/2014 8:31 PM Lsass-Log.blg
-a--- 1/15/2014 8:32 PM 458752 Lsass-Log_01152030.blg
----- 1/15/2014 8:32 PM 65536 Lsass-Log_01152032.blg
¯\_(ツ)_/¯ -
HI,
I AM USING FOLLOWING CODE IN SAP SCRIPT
/: PERFORM SUM IN PROGRAM ZSUM
/: USING ®UD-WRBTR&
/: USING ®UD-WABZG&
/: CHANGING &VAR&
/: ENDPERFORM
AND PROGRAM
FORM SUM USING TABLES IN_PAR STRUCTURE ITCSY
changing OUT_PAR STRUCTURE ITCSY.
READ TABLE IN_PAR WITH KEY NAME = VAR1.
var1_sc = IN_PAR-VALUE.
READ TABLE IN_PAR WITH KEY NAME = VAR2.
var2_sc = IN_PAR-VALUE.
tot = var1_sc - var2_sc.
READ TABLE OUT_PAR WITH KEY NAME = VAR.
Out_PAR-VALUE = tot.
ENDFORM.
NOW ITS GIVING DUMP TELLING "This routine contains 3 formal para , but the current call contains 4 actual parameters." IF I COMMENT CODE IN FORM.
IF I REMOVE CODE IN FORM THEN IT GIVE SYSTAX ERROR :
& ALSO in_PAR IS NOT INTERNAL TABLE\
PLEASE HELP MEHi
You are using 2 parameters ®UD-WRBTR&
®UD-WABZG& only with perform
see the sample code and do accordingly
How to call a subroutine form SAPscripts
The Form :
/:PERFORM CDE_CENT IN PROGRAM ZKRPMM_PERFORM_Z1MEDRUCK
/:USING &EKKO-EBELN&
/:CHANGING &CDECENT&
/:ENDPERFORM
The report :
REPORT zkrpmm_perform_z1medruck .
DATA : BEGIN OF it_input_table OCCURS 10.
INCLUDE STRUCTURE itcsy.
DATA : END OF it_input_table.
déclaration de la table output_table contenant les
variables exportées
DATA : BEGIN OF it_output_table OCCURS 0.
INCLUDE STRUCTURE itcsy.
DATA : END OF it_output_table.
DATA : w_ebeln LIKE ekko-ebeln,
w_vbeln LIKE vbak-vbeln,
w_zcdffa LIKE vbak-zcdffa.
FORM CDE_CENT
FORM cde_cent TABLES input output.
it_input_table[] = input[].
it_output_table[] = output[].
READ TABLE it_input_table INDEX 1.
MOVE it_input_table-value TO w_ebeln.
CALL FUNCTION 'CONVERSION_EXIT_ALPHA_INPUT'
EXPORTING
input = w_ebeln
IMPORTING
output = w_ebeln.
SELECT SINGLE zcdffa FROM ekko
INTO w_zcdffa
WHERE ebeln = w_ebeln.
it_output_table-name = 'CDECENT'.
MOVE w_zcdffa TO it_output_table-value.
MODIFY it_output_table INDEX 1.
output[] = it_output_table[].
ENDFORM.
REPORT ZMPO1 .
form get_freight tables in_par structure itcsy out_par structure itcsy.
tables: ekko,konv,t685t.
data: begin of itab occurs 0,
ebeln like ekko-ebeln,
knumv like ekko-knumv,
end of itab.
data: begin of itab1 occurs 0,
knumv like konv-knumv,
kposn like konv-kposn,
kschl like konv-kschl,
kbetr like konv-kbetr,
waers like konv-waers,
kwert like konv-kwert,
end of itab1.
data: begin of iout occurs 0,
kschl like konv-kschl,
vtext like t685t-vtext,
kbetr like konv-kbetr,
kwert like konv-kwert,
end of iout.
data v_po like ekko-ebeln.
read table in_par with key 'EKKO-EBELN'.
if sy-subrc = 0.
v_po = in_par-value.
select
ebeln
knumv
from ekko
into table itab
where ebeln = v_po.
if sy-subrc = 0.
loop at itab.
select
knumv
kposn
kschl
kbetr
waers
kwert
into table itab1
from konv
where knumv = itab-knumv and
kappl = 'M'.
endloop.
loop at itab1.
if itab1-kposn <> 0.
select single * from t685t
where kschl = itab1-kschl
and kappl = 'M'
and spras = 'EN'.
iout-vtext = t685t-vtext.
iout-kschl = itab1-kschl.
iout-kbetr = itab1-kbetr.
iout-kwert = itab1-kwert.
append iout.
clear iout.
endif.
endloop.
sort itab1 by kposn.
loop at iout.
sort iout by kschl.
if ( iout-kschl eq 'GSDC' OR
iout-kschl eq 'GSFR' OR
iout-kschl eq 'GSIR' ).
at end of kschl.
read table iout index sy-tabix.
sum.
write:/ iout-kschl,iout-vtext,iout-kwert.
out_par-name = 'A1'.
out_par-value = iout-vtext.
append out_par.
out_par-name = 'A2'.
out_par-value = iout-kwert.
append out_par.
endat.
endif.
endloop.
endif.
endif.
endform.
IN THE FORM I AM WRITING THIS CODE.
/:DEFINE &A1& = ' '
/:DEFINE &A2& = ' '
/:PERFORM GET_FREIGHT IN PROGRAM ZMFORM_PO1
/:USING &EKKO-EBELN&
/:CHANGING &A1&
/:CHANGING &A2&
/:ENDPERFORM
&A1&
&A2&
Reward points for useful Answers
Regards
Anji
Message was edited by:
Anji Reddy Vangala -
there is a pop up about a problem with script. it ask me end and contuniue the script. i didnt have that problem before. plz help me it gets really irritating. it asks a lot
This issue can be caused by an extension that isn't working properly.
Start Firefox in <u>[[Safe Mode]]</u> to check if one of the extensions or if hardware acceleration is causing the problem (switch to the DEFAULT theme: Firefox (Tools) > Add-ons > Appearance/Themes).
*Don't make any changes on the Safe mode start window.
*https://support.mozilla.com/kb/Safe+Mode -
Abt clear value problem in scripts
Hi,
Im working on scripts.in scripts im calculating totals by using subroutine.but im facing problem.
my problem is first time i calculated it's working fine.
when i go back and enter other order number it's taking previous order number and present total and it displays these totals.
i clear the it_out in se38 and the varible which holds the total.
but it's not working.
please help me in this.
Thanks & Regards,
SrinivasHi this is my abap code.
FORM get_extpr_tot TABLES it_input STRUCTURE itcsy it_output STRUCTURE itcsy.
REFRESH : it_output.
CLEAR v_extpr_tot.
DATA: v_vbeln2(10) TYPE n.
REFRESH it_input.
Clear v_vbeln2.
clear v_extpr_tot1.
READ TABLE it_input INDEX 1.
MOVE it_input-value TO v_vbeln2.
READ TABLE it_input INDEX 2.
MOVE it_input-value TO v_extpr_tot.
v_extpr_tot1 = v_extpr_tot1 + v_extpr_tot.
READ TABLE it_output INDEX 1.
WRITE v_extpr_tot1 TO it_output-value LEFT-JUSTIFIED.
MODIFY it_output INDEX 1.
Clear it_output.
clear v_extpr_tot1.
REFRESH it_output.
ENDFORM. "GET_EXTPR_TOT
and my se71 code is
PERFORM GET_EXTPR_TOT IN PROGRAM ZSP_SD_ORDCM.
USING &VBDKA-VBELN&
USING &V_PRICE&
CHANGING &V_EXTPR_TOT1&
ENDPERFORM
please help me
Maybe you are looking for
-
How to delete photos in my Ipad
How to delete photos in Ipad
-
F-44 - Clearing of more than 999 line items
Hi, I am using transaction code F-44 for clearing vendor line items but vendor line items are more than 999 (In fact they are well above 65000) SAP does not allow postings in a single doc of more than 999 line items. can someone suggest methe procedu
-
Satellite C660 - DVD player keeps ejecting
Hi This is a problem that has only just started. Every time I power notebook up the first thing it does is eject the DVD player which is empty. It also does the same after power save mode has been on. Notebook runs fine otherwise, its not a major pro
-
Credit balance is lower than I expected.
A week ago I have subscribed skype credit for 10 EUROS. It says the call rates to India are 1.1 cent per minute. Int his case I should get more than 900 minutes for 10 EUROS. I have not used more then 300 minutes till now. But my current skype balanc
-
Height of text object / database field
Hello, is it possible to size the height of each field in the detail section to the height of the detail section via formula or setting? Regards