Repeat on function in ME21N
Hi,
Could some one let me know how does this Repeat On function work (available in account assignement tab) while creating Purchase order using T code ME21N ?
Thanks
ArunVijay D
Hello,
One of our users noticed that once the 'Repeat' option is turned on in ME21N on the Account Assignment tab, she cannot get it to turn off even for subsequent purchase orders she creates. One of our developers was able to duplicate this issue in our Develpment system as well. We switch off the 'Repeat' (matchstick) under the Account Assignment tab for a line item, and then if we go to the next line, the 'Repeat' option shows as being on again. Then if we create a second purchase order, this 'Repeat' option is automatically on also.
We are on ERP 6.0 for EHP4 and have recently upgraded to Office 2007.
Does anyone know how to turn this option off again so it doesn't automatically stay on for the user? There doesn't seem to be any setting under the Personal Settings that would affect this.
Thanks for any help on this.
Cheryl
Edited by: Cheryl Hellestad on Nov 3, 2010 5:32 PM
Similar Messages
-
How do I repeat a function that starts immediately?
Hi,
I am using a Timer function to repeat a function however the function only begins (and repeats) after the period set eg. 5 seconds not immediately.
Here is an example of the code:
var myTimer:Timer = new Timer(2000,8);
myTimer.addEventListener(TimerEvent.TIMER, timerListener);
function timerListener (e:TimerEvent):void{
trace("Timer is Triggered");
myTimer.start();
Is there any way to make the function start immediately then repeat?
Thanks
Chrisafter timer.start()
add
myTimer.dispatchEvent(new TimerEvent(TimerEvent.TIMER));
this will trigger your function immediately -
IPod repeat one function on the iPad is broken
I have found that most of the time, the repeat one function when using the iPod function on my ipad just doesn't work. I know where the setting is (on the now playing page), and I select the little circle of two arrows with the 1 on it... and when it gets to the end of the song it goes right on to the next one- usually. Sometimes it works, I don't know why. I don't understand how hey screwed that up; it works just fine on my iPhone and every ipod I own.
same here with iPad1 on 4.3.3.. quite annoying when you want one special song looping (e.g. as gaming background) - need to wait for the jump to the next song, jump back one manually, and then the loop works.
I'll be experimenting around a bit to see whether it might depend on the song (file format, bought/ripped...), the issue seems too rare, at least Google turns up only a few hits, compared to other ipod bugs. -
Hi SDN,
Is there is any standard function module for repeat output in the shipments(VL02N)?
Call the transaction VL02N , go to "GOTO" from the menu and choose "OUTPUT". Then select a output type and then press the button "REPEAT OUTPUT".Hello Ricky
To transform ABAP to XML you can use the simple transformation, e.g.:
DATA:
gt_itab TYPE TABLE OF knb1,
gd_xml TYPE string.
* Select data into gt_itab
CALL TRANSFORMATION id_ident
SOURCE abap = gt_itab
RESULT XML gd_xml.
You could place this coding into a function module having an IMPORTING parameter of type TABLE (generic table type). However, this generic type will not work for a RFC-enable function module.
Regards
Uwe -
Implementing a "repeat command" function
I'm working on a text editor, with much the same functionality as vi. I'm kinda stuck on the "repeat last command" feature. My thought was to get the most recent undoable edit, and then call a redo on it, but that doesn't seem to be working. Any ideas?
I'm implementing undo/redo as outlined in this page
http://java.sun.com/docs/books/tutorial/uiswing/components/generaltext.html
which basically consists of...
1) create a new instance of UndoManager (defined in javax.swing.undo)
2) register the document object of the text area as an UndoableEditListener
3) implement undo and redo actions that extend AbstractAction (I copied these from the above page)
4) call the UndoManager's undo and redo methods from the undo and redo actions.
My idea for repeat was to call the UndoManager's editToBeUndone() method (the most recent edit) and call the redo() method of the UndoableEdit object that it returns. However, the editToBeUndone() method is protected, so I created a class that extends UndoManager and overrode the editToBeUndone() method as follows.
public UndoableEdit editToBeUndone(){
return super.editToBeRedone();
This could be wrong, but I'm pretty sure I've done something similar before.
The other thing that could be a problem is the redo() method of the UndoableEdit class. In the API, it reads "Re-apply the edit, assuming that it has been undone." I don't really know what it means by, "assuming that it has been undone." Is there somewhere I can find a more detailed description? It doesn't throw a CannotRedoException.
What is an undoable edit and not undoable are (presumably) defined in javax.swing.undo also.
Thanks for your reply,
jt -
Can I customize the 'repeat' function on the Calendar? I want to include an 'every 3 months' category.
Here's what I mean about the iCloud suggestion:
If your calendar is truly on iCloud, even though you use a Windows computer, you could go to:
http://www.icloud.com
... on your Windows computer, log in, and see your calendar there. Then you could perform the "Repeat" "Custom" edit I mentioned above. Since your calendar would be correct on iCloud, it would also be correct on your iPad. -
Repeat / Restart Function on Condition
Hello,
I am attempting to put a statement in my .mxml file to make a private function restart if a certain condition is met. I am not pro at coding in .mxml, but I believe I have a start at solving this issue. Below it the code for my function, up to the point that the code would restart, if the condition is true:
The last five lines are devoted to making the function restart itself if the condition 'mapServicesArray.length < 13'. The line 'init (private function populateLayerDataDictionary);' is supposed to trigger the restart, but I am not sure how to do it (this code clearly doesn't, it is a test of mine). Any advice would be welcome.
Thank you in advance! (and sorry for my poor code formatting in this post!)Here is the code to the function as I have it so far:
private function populateLayerDataDictionary():void
//the smallest and largest scales reasonably possible
var smallestScale:Number = map.lods ? map.lods[0].scale : 1000000000;
var largestScale:Number = map.lods ? map.lods[map.lods.length - 1].scale : 1;
var data:Object;
var priority:int = 0;
var agsVersion:Number;
// The next line controls whether the proxy in the <httpproxy> tag in config.xml
// is used for each layer. If want this set it to true; otherwise set it to false.
// If there is no <httpproxy> tag in config.xml then the value of useProxy doesn't matter.
var useProxy:Boolean = true;
for each (var layer:Layer in map.layers)
trace(layer.id);
if (layer is ArcGISDynamicMapServiceLayer)
var dmsLayer:ArcGISDynamicMapServiceLayer = layer as ArcGISDynamicMapServiceLayer;
if (useProxy) dmsLayer.proxyURL = configData.proxyUrl;
agsVersion = dmsLayer.version;
if (isNaN(agsVersion))
// This happens if the map includes a service that is turned off or doesn't exist
mapServicesProcessed++;
continue;
//make an object for this map service to hold the layer information
var dmsMapServiceObj:Object = {id: dmsLayer.id, layers: new Array(), priority: priority++, url: dmsLayer.url, token: dmsLayer.token, proxyUrl: dmsLayer.proxyURL};
//add the map service object to the array of map services
mapServicesArray.push(dmsMapServiceObj);
// set the max and min scales
var maxScale:Number = layer.maxScale;
var minScale:Number = layer.minScale;
var getScales:Boolean = (maxScale == 0 && minScale == 0);
if (getScales)
for each (var layerInfo:LayerInfo in dmsLayer.layerInfos)
if (layerInfo.maxScale > 0 && (maxScale == 0 || layerInfo.maxScale < maxScale)) maxScale = layerInfo.maxScale;
if (layerInfo.minScale > 0 && layerInfo.minScale > minScale) minScale = layerInfo.minScale;
layer.maxScale = maxScale > 0 ? maxScale : largestScale;
layer.minScale = minScale > 0 ? minScale : smallestScale;
data = {name: dmsLayer.name, url: dmsLayer.url, token: dmsLayer.token, rtDefExpr: "", proxyUrl: dmsLayer.proxyURL};
dmsLayer.getAllDetails(new AsyncResponder(onResult, onFault, data));
else if (layer is ArcGISTiledMapServiceLayer)
var tmsLayer:ArcGISTiledMapServiceLayer = layer as ArcGISTiledMapServiceLayer;
if (useProxy) tmsLayer.proxyURL = configData.proxyUrl;
agsVersion = tmsLayer.version;
if (isNaN(agsVersion))
// This happens if the map includes a service that is turned off or doesn't exist
mapServicesProcessed++;
continue;
//make an object for this map service to hold the layer information
var tmsMapServiceObj:Object = {id: tmsLayer.id, layers: new Array(), priority: priority++, url: tmsLayer.url, token: tmsLayer.token, proxyUrl: tmsLayer.proxyURL};
//add the map service object to the array of map services
mapServicesArray.push(tmsMapServiceObj);
if (layer.maxScale == 0 && layer.minScale == 0 && tmsLayer.tileInfo)
layer.maxScale = tmsLayer.tileInfo.lods[tmsLayer.tileInfo.lods.length - 1].scale;
layer.minScale = tmsLayer.tileInfo.lods[0].scale;
data = {name: tmsLayer.name, url: tmsLayer.url, token: tmsLayer.token, rtDefExpr: "", proxyUrl: tmsLayer.proxyURL};
tmsLayer.getAllDetails(new AsyncResponder(onResult, onFault, data));
else if (layer is FeatureLayer)
var feaLayer:FeatureLayer = layer as FeatureLayer;
var layerDetails:LayerDetails = feaLayer.layerDetails;
var tableDetails:TableDetails = feaLayer.tableDetails;
if (layerDetails)
agsVersion = layerDetails.version;
else if (tableDetails)
agsVersion = tableDetails.version;
else
agsVersion = NaN;
if (isNaN(agsVersion))
// This happens if the map includes a service that is turned off or doesn't exist
mapServicesProcessed++;
continue;
var url:String = feaLayer.url;
var pos:int = url.lastIndexOf("/");
url = url.slice(0, pos);
//make an object for this map service to hold the layer information
var feaMapServiceObj:Object = {id: feaLayer.id, layers: new Array(), priority: priority++, url: url, token: feaLayer.token, proxyUrl: feaLayer.proxyURL};
//add the map service object to the array of map services
mapServicesArray.push(feaMapServiceObj);
data = {name: feaLayer.name, url: url, token: feaLayer.token, rtDefExpr: feaLayer.definitionExpression, proxyUrl: feaLayer.proxyURL};
var allDetails:AllDetails = new AllDetails();
allDetails.layersDetails = [layerDetails];
allDetails.tablesDetails = [tableDetails];
onResult(allDetails, data);
else
// skip other kinds of layers (e.g. image services)
mapServicesProcessed++;
// restarts and repeats populateLayerDataDictionary if there are missing services
if (mapServicesArray.length < 13)
init (private function populateLayerDataDictionary); -
Problem in updating Partner function in ME21N
Hi All
In normal SAP if a vendor having more than one GS partners in vendor master and you are trying to create Purchase order using that vendor then a pop up will come. It will have list of GS vendors and wil prompt you to choose one of them as PO requires 5 mandatory vendor partners.
Basic requirement is to hide that popup and populate that GS vendor automactically. I am having another custom table in my requirement where I need to check the vendor number against material number what I put in the item details. That custom table contains vendor numbers and material numbers.
So I tried to get one exit/badi/enhancement spot where I could get the item details and Partner details. But did not get anything. I could manage to hide the pop up now. Now I need to populate the GS vendor.
If anyone know how to do it kindly help me. Its Urgent.
Thanks in advance.
Regards
RajProbles is solved by passing proper data in opportunity , appointment and orderas_h , partner , status and input_filds in CRM_ORDER_MAINTAIN fm .
-
I would like to repeat a function . I need to multiply the amount of cells 1-30 individually by a factor ..00350
1 345.00*.350
1 258.00*.350leaseman wrote:
I would like to repeat a function . I need to multiply the amount of cells 1-30 individually by a factor ..00350
1 345.00*.350
1 258.00*.350
It's one of the basic functions of every spreadsheet.
In C2 i entered the formula:
=ROUND(B*0.35,2)
then I selected cell C2 and used the autofill function to fill cells C3 thru C5.
This function is described in the Help as well as in the PDF User Guide.
Numbers offers a more powerful function described as "Applying a Formula Once to Cells in a Column or Row" in the already named resources.
In my table, row 1 is an header one.
In D1 I entered:
=IF(ISBLANK(B),"",ROUND(B*0.35,2))
it applyes to every cells of the column.
The ISBLANK function is used to get a clean aspect in rows where there is no data entered.
Yvan KOENIG (from FRANCE dimanche 9 novembre 2008 19:02:17) -
Reuse Repeater.currentItem value in a function
Hello everyone,
I'm trying to reuse a value coming from a repeater to instantiate some variable. Could somebody please point me towards a solution for this?
<pre>
<mx:Repeater id="rp"
dataProvider="{dataCollection.collection.resource}">
<mx:Label id="domains" height="24" width="150"
color="0x0B333C"
text="{String(rp.currentItem.@label)}"
click="domainDescriptionLoader(rp.currentItem.@label)" />
</mx:Repeater>
</pre>
<pre>
private function domainDescriptionLoader(str:String):void {
docPath = str;
appendText(docPath);
</pre>
All the best,
PierreIn this case, you can use pass the event to the event handler for click and access its target (the repeated Label). The Label's text property will contain the label you're interested in. In general, you can use the repeater and repeaterIndex properties of UIComponent to find the corresponding item.
More explicitly:
<mx:Repeater id="rp"
dataProvider="{dataCollection.collection.resource}">
<mx:Label id="domains" height="24" width="150"
color="0x0B333C"
text="{String(rp.currentItem.@label)}"
click="handleClick(event)" />
</mx:Repeater>
private function handleClick(e:Event):void {
docPath = e.target.text;
appendText(docPath); -
Trigger a function after 1 minute while the app is open.
Hey guys, I wrote a simple widget that reads from a rss file. My question is what's a good way to repeat a function every minute? The widget could run up to 8 hours straight..
Any ideas? I'd like to trigger bugsFeed.send(); once a minute.
thanks!Example code:
import flash.utils.Timer;
import flash.events.TimerEvent;
// create a timer that fires every minute
public var timer:Timer = new Timer( 60*1000 );
public function init():void
// add event listeners
timer.addEventListener( TimerEvent.TIMER, handleTimerEvent );
// start the timer
timer.start();
public function handleTimerEvent( event:TimerEvent ):void
bugsFeed.send();
Let me know if that helps...
Ben Edwards -
Function module used for formatting alv
hi gurus,
which function module is uesd to format alv?Hi
see the following
ABAP List Viewer
The common features of report are column alignment, sorting, filtering, subtotals, totals etc. To implement these, a lot of coding and logic is to be put. To avoid that we can use a concept called ABAP List Viewer (ALV).
This helps us to implement all the features mentioned very effectively.
Using ALV, We can have three types of reports:
1. Simple Report
2. Block Report
3. Hierarchical Sequential Report
There are some function modules which will enable to produce the above reports without much effort.
All the definitions of internal tables, structures and constants are declared in a type-pool called SLIS.
1. SIMPLE REPORT.
The important function modules are
a. Reuse_alv_list_display
b. Reuse_alv_fieldcatalog_merge
c. Reuse_alv_events_get
d. Reuse_alv_commentary_write
e. Reuse_alv_grid_display
A. REUSE_ALV_LIST_DISPLAY : This is the function module which prints the data.
The important parameters are :
I. Export :
i. I_callback_program : report id
ii. I_callback_pf_status_set : routine where a user can set his own pf status or change the functionality of the existing pf status
iii. I_callback_user_command : routine where the function codes are handled
iv. I_structure name : name of the dictionary table
v. Is_layout : structure to set the layout of the report
vi. It_fieldcat : internal table with the list of all fields and their attributes which are to be printed (this table can be populated automatically by the function module REUSE_ALV_FIELDCATALOG_MERGE
vii. It_events : internal table with a list of all possible events of ALV and their corresponding form names.
II. Tables :
i. t_outtab : internal table with the data to be output
B. REUSE_ALV_FIELDCATALOG_MERGE : This function module is used to populate a fieldcatalog which is essential to display the data in ALV. If the output data is from a single dictionary table and all the columns are selected, then we need not exclusively create the field catalog. Its enough to mention the table name as a parameter(I_structure name) in the REUSE_ALV_LIST_DISPLAY. But in other cases we need to create it.
The Important Parameters are :
I. Export :
i. I_program_name : report id
ii. I_internal_tabname : the internal output table
iii. I_inclname : include or the report name where all the dynamic forms are handled.
II Changing
ct_fieldcat : an internal table with the type SLIS_T_FIELDCAT_ALV which is
declared in the type pool SLIS.
C. REUSE_ALV_EVENTS_GET : Returns table of possible events for a list type
Parameters :
I. Import :
Et_Events : The event table is returned with all possible CALLBACK events
for the specified list type (column 'NAME'). For events to be processed by Callback, their 'FORM' field must be filled. If the field is initialized, the event is ignored. The entry can be read from the event table, the field 'FORM' filled and the entry modified using constants from the type pool SALV.
II. Export :
I_List_type :
0 = simple list REUSE_ALV_LIST_DISPLAY
1 = hierarchcal-sequential list REUSE_ALV_HIERSEQ_LIST_DISPLAY
2 = simple block list REUSE_ALV_BLOCK_LIST_APPEND
3 = hierarchical-sequential block list
REUSE_ALV_BLOCK_LIST_HS_APPEND
D. REUSE_ALV_COMMENTARY_WRITE : This is used in the Top-of-page event to print the headings and other comments for the list.
Parameters :
I. it_list_commentary : internal table with the headings of the type slis_t_listheader.
This internal table has three fields :
Typ : H header, S selection , A - action
Key : only when typ is S.
Info : the text to be printed
E. REUSE_ALV_GRID_DISPLAY : A new function in 4.6 version, to display the results in grid rather than as a preview.
Parameters : same as reuse_alv_list_display
This is an example for simple list.
2. BLOCK REPORT
This is used to have multiple lists continuously.
The important functions used in this report are:
A. REUSE_ALV_BLOCK_LIST_INIT
B. REUSE_ALV_BLOCK_LIST_APPEND
C. REUSE_ALV_BLOCK_LIST_HS_APPEND
D. REUSE_ALV_BLOCK_LIST_DISPLAY
A. REUSE_ALV_BLOCK_LIST_INIT
Parameters:
I. I_CALLBACK_PROGRAM
II. I_CALLBACK_PF_STATUS_SET
III. I_CALLBACK_USER_COMMAND
This function module is used to set the default gui status etc.
B. REUSE_ALV_BLOCK_LIST_APPEND
Parameters :
Export :
I. is_layout : layout settings for block
II. it_fieldcat : field catalog
III. i_tabname : internal table name with output data
IV. it_events : internal table with all possible events
Tables :
i. t_outtab : internal table with output data.
This function module adds the data to the block.
Repeat this function for all the different blocks to be displayed one after the other.
C. REUSE_ALV_BLOCK_LIST_HS_APPEND
This function module is used for hierarchical sequential blocks.
D. REUSE_ALV_BLOCK_LIST_DISPLAY
Parameters : All the parameters are optional.
This function module display the list with data appended by the above function.
Here the functions REUSE_ALV_FIELDCATALOG_MERGE, REUSE_ALV_EVENTS_GET, REUSE_ALV_COMMENTARY_WRITE can be used.
3. Hierarchical reports :
Hierarchical sequential list output.
The function module is
A. REUSE_ALV_HIERSEQ_LIST_DISPLAY
Parameters:
I. Export:
i. I_CALLBACK_PROGRAM
ii. I_CALLBACK_PF_STATUS_SET
iii. I_CALLBACK_USER_COMMAND
iv. IS_LAYOUT
v. IT_FIELDCAT
vi. IT_EVENTS
vii. i_tabname_header : Name of the internal table in the program containing the
output data of the highest hierarchy level.
viii. i_tabname_item : Name of the internal table in the program containing the
output data of the lowest hierarchy level.
ix. is_keyinfo : This structure contains the header and item table field
names which link the two tables (shared key).
II. Tables
i. t_outtab_header : Header table with data to be output
ii. t_outtab_item : Name of the internal table in the program containing the
output data of the lowest hierarchy level.
slis_t_fieldcat_alv : This internal table contains the field attributes. This internal table can be populated automatically by using REUSE_ALV_FIELDCATALOG_MERGE.
Important Attributes :
A. col_pos : position of the column
B. fieldname : internal fieldname
C. tabname : internal table name
D. ref_fieldname : fieldname (dictionary)
E. ref_tabname : table (dictionary)
F. key(1) : column with key-color
G. icon(1) : icon
H. symbol(1) : symbol
I. checkbox(1) : checkbox
J. just(1) : (R)ight (L)eft (C)ent.
K. do_sum(1) : sum up
L. no_out(1) : (O)blig.(X)no out
M. outputlen : output length
N. seltext_l : long key word
O. seltext_m : middle key word
P. seltext_s : short key word
Q. reptext_ddic : heading (ddic)
R. ddictxt(1) : (S)hort (M)iddle (L)ong
S. datatype : datatype
T. hotspot(1) : hotspot
Simple ALV report
http://www.sapgenie.com/abap/controls/alvgrid.htm
http://wiki.ittoolbox.com/index.php/Code:Ultimate_ALV_table_toolbox
ALV
1. Please give me general info on ALV.
http://www.sapfans.com/forums/viewtopic.php?t=58286
http://www.sapfans.com/forums/viewtopic.php?t=76490
http://www.sapfans.com/forums/viewtopic.php?t=20591
http://www.sapfans.com/forums/viewtopic.php?t=66305 - this one discusses which way should you use - ABAP Objects calls or simple function modules.
2. How do I program double click in ALV?
http://www.sapfans.com/forums/viewtopic.php?t=11601
http://www.sapfans.com/forums/viewtopic.php?t=23010
Check the program in the following link:
http://sap-img.com/abap/display-secondary-list-using-alv-grid.htm
3. How do I add subtotals (I have problem to add them)...
http://www.sapfans.com/forums/viewtopic.php?t=20386
http://www.sapfans.com/forums/viewtopic.php?t=85191
http://www.sapfans.com/forums/viewtopic.php?t=88401
http://www.sapfans.com/forums/viewtopic.php?t=17335
http://www.sapdevelopment.co.uk/reporting/alv/alvgrid_basic.htm
4. How to add list heading like top-of-page in ABAP lists?
http://www.sapfans.com/forums/viewtopic.php?t=58775
http://www.sapfans.com/forums/viewtopic.php?t=60550
http://www.sapfans.com/forums/viewtopic.php?t=16629
5. How to print page number / total number of pages X/XX in ALV?
http://www.sapfans.com/forums/viewtopic.php?t=29597 (no direct solution)
6. ALV printing problems. The favourite is: The first page shows the number of records selected but I don't need this.
http://www.sapfans.com/forums/viewtopic.php?t=64320
http://www.sapfans.com/forums/viewtopic.php?t=44477
7. How can I set the cell color in ALV?
http://www.sapfans.com/forums/viewtopic.php?t=52107
8. How do I print a logo/graphics in ALV?
http://www.sapfans.com/forums/viewtopic.php?t=81149
http://www.sapfans.com/forums/viewtopic.php?t=35498
http://www.sapfans.com/forums/viewtopic.php?t=5013
9. How do I create and use input-enabled fields in ALV?
http://www.sapfans.com/forums/viewtopic.php?t=84933
http://www.sapfans.com/forums/viewtopic.php?t=69878
10. How can I use ALV for reports that are going to be run in background?
http://www.sapfans.com/forums/viewtopic.php?t=83243
http://www.sapfans.com/forums/viewtopic.php?t=19224
11. How can I display an icon in ALV? (Common requirement is traffic light icon).
http://www.sapfans.com/forums/viewtopic.php?t=79424
http://www.sapfans.com/forums/viewtopic.php?t=24512
12. How can I display a checkbox in ALV?
http://www.sapfans.com/forums/viewtopic.php?t=88376
http://www.sapfans.com/forums/viewtopic.php?t=40968
http://www.sapfans.com/forums/viewtopic.php?t=6919
13. Top-of-page in ALV
selection-screen and top-of-page in ALV
14. ALV Group Heading
http://www.sap-img.com/fu037.htm
How to add list heading like top-of-page in ABAP lists?
http://www.sapfans.com/forums/viewtopic.php?t=58775
http://www.sapfans.com/forums/viewtopic.php?t=60550
http://www.sapfans.com/forums/viewtopic.php?t=16629
15. ALV output to PDF conversion
It has an example code for PDF Conversion.
http://www.erpgenie.com/abap/code/abap51.htm
converting the output of alv in pdf
Go thru these programs they may help u to try on some hands on
ALV Demo program
BCALV_DEMO_HTML
BCALV_FULLSCREEN_DEMO ALV Demo: Fullscreen Mode
BCALV_FULLSCREEN_DEMO_CLASSIC ALV demo: Fullscreen mode
BCALV_GRID_DEMO Simple ALV Control Call Demo Program
BCALV_TREE_DEMO Demo for ALV tree control
BCALV_TREE_SIMPLE_DEMO
BC_ALV_DEMO_HTML_D0100
Regards
Anji -
Hi all,
I would like to use the content of tables LQUA and LAGP and some other SAP tables in a own function.
I don't want much data transfer on the system, but these tables are very big.
How do I reach the data in the tables?
Do I have to supply the records through the tables section of the function?
And if so how do I do that with minimal data transfer?
gteetings Fredhi
see this sample
REPORT PARAJOB.
Data declarations
DATA: GROUP LIKE RZLLITAB-CLASSNAME VALUE ' ',
"Parallel processing group.
"SPACE = group default (all
"servers)
WP_AVAILABLE TYPE I, "Number of dialog work processes
"available for parallel processing
"(free work processes)
WP_TOTAL TYPE I, "Total number of dialog work
"processes in the group
MSG(80) VALUE SPACE, "Container for error message in
"case of remote RFC exception.
INFO LIKE RFCSI, C, "Message text
JOBS TYPE I VALUE 10, "Number of parallel jobs
SND_JOBS TYPE I VALUE 1, "Work packets sent for processing
RCV_JOBS TYPE I VALUE 1, "Work packet replies received
EXCP_FLAG(1) TYPE C, "Number of RESOURCE_FAILUREs
TASKNAME(4) TYPE N VALUE '0001', "Task name (name of
"parallel processing work unit)
BEGIN OF TASKLIST OCCURS 10, "Task administration
TASKNAME(4) TYPE C,
RFCDEST LIKE RFCSI-RFCDEST,
RFCHOST LIKE RFCSI-RFCHOST,
END OF TASKLIST.
Optional call to SBPT_INITIALIZE to check the
group in which parallel processing is to take place.
Could be used to optimize sizing of work packets
work / WP_AVAILABLE).
CALL FUNCTION 'SPBT_INITIALIZE'
EXPORTING
GROUP_NAME = GROUP
"Name of group to check
IMPORTING
MAX_PBT_WPS = WP_TOTAL
"Total number of dialog work
"processes available in group
"for parallel processing
FREE_PBT_WPS = WP_AVAILABLE
"Number of work processes
"available in group for
"parallel processing at this
"moment
EXCEPTIONS
INVALID_GROUP_NAME = 1
"Incorrect group name; RFC
"group not defined. See
"transaction RZ12
INTERNAL_ERROR = 2
"R/3 System error; see the
"system log (transaction
"SM21) for diagnostic info
PBT_ENV_ALREADY_INITIALIZED = 3
"Function module may be
"called only once; is called
"automatically by R/3 if you
"do not call before starting
"parallel processing
CURRENTLY_NO_RESOURCES_AVAIL = 4
"No dialog work processes
"in the group are available;
"they are busy or server load
"is too high
NO_PBT_RESOURCES_FOUND = 5
"No servers in the group
"met the criteria of >
"two work processes
"defined.
CANT_INIT_DIFFERENT_PBT_GROUPS = 6
"You have already initialized
"one group and have now tried
"initialize a different group.
OTHERS = 7..
CASE SY-SUBRC.
WHEN 0.
"Everythings ok. Optionally set up for optimizing size of
"work packets.
WHEN 1.
"Non-existent group name. Stop report.
MESSAGE E836. "Group not defined.
WHEN 2.
"System error. Stop and check system log for error
"analysis.
WHEN 3.
"Programming error. Stop and correct program.
MESSAGE E833. "PBT environment was already initialized.
WHEN 4.
"No resources: this may be a temporary problem. You
"may wish to pause briefly and repeat the call. Otherwise
"check your RFC group administration: Group defined
"in accordance with your requirements?
MESSAGE E837. "All servers currently busy.
WHEN 5.
"Check your servers, network, operation modes.
WHEN 6.
Do parallel processing. Use CALL FUNCTION STARTING NEW TASK
DESTINATION IN GROUP to call the function module that does the
work. Make a call for each record that is to be processed, or
divide the records into work packets. In each case, provide the
set of records as an internal table in the CALL FUNCTION
keyword (EXPORT, TABLES arguments).
DO.
CALL FUNCTION 'RFC_SYSTEM_INFO' "Function module to perform
"in parallel
STARTING NEW TASK TASKNAME "Name for identifying this
"RFC call
DESTINATION IN GROUP group "Name of group of servers to
"use for parallel processing.
"Enter group name exactly
"as it appears in transaction
"RZ12 (all caps). You may
"use only one group name in a
"particular ABAP program.
PERFORMING RETURN_INFO ON END OF TASK
"This form is called when the
"RFC call completes. It can
"collect IMPORT and TABLES
"parameters from the called
"function with RECEIVE.
EXCEPTIONS
COMMUNICATION_FAILURE = 1 MESSAGE msg
"Destination server not
"reached or communication
"interrupted. MESSAGE msg
"captures any message
"returned with this
"exception (E or A messages
"from the called FM, for
"example. After exception
"1 or 2, instead of aborting
"your program, you could use
"SPBT_GET_PP_DESTINATION and
"SPBT_DO_NOT_USE_SERVER to
"exclude this server from
"further parallel processing.
"You could then re-try this
"call using a different
"server.
SYSTEM_FAILURE = 2 MESSAGE msg
"Program or other internal
"R/3 error. MESSAGE msg
"captures any message
"returned with this
"exception.
RESOURCE_FAILURE = 3. "No work processes are
"currently available. Your
"program MUST handle this
"exception.
YOUR_EXCEPTIONS = X. "Add exceptions generated by
"the called function module
"here. Exceptions are
"returned to you and you can
"respond to them here.
CASE SY-SUBRC.
WHEN 0.
"Administration of asynchronous RFC tasks
"Save name of task...
TASKLIST-TASKNAME = TASKNAME.
"... and get server that is performing RFC call.
CALL FUNCTION 'SPBT_GET_PP_DESTINATION'
EXPORTING
RFCDEST = TASKLIST-RFCDEST
EXCEPTIONS
OTHERS = 1.
APPEND TASKLIST.
WRITE: / 'Started task: ', TASKLIST-TASKNAME COLOR 2.
TASKNAME = TASKNAME + 1.
SND_JOBS = SND_JOBS + 1.
"Mechanism for determining when to leave the loop. Here, a
"simple counter of the number of parallel processing tasks.
"In production use, you would end the loop when you have
"finished dispatching the data that is to be processed.
JOBS = JOBS - 1. "Number of existing jobs
IF JOBS = 0.
EXIT. "Job processing finished
ENDIF.
WHEN 1 OR 2.
"Handle communication and system failure. Your program must
"catch these exceptions and arrange for a recoverable
"termination of the background processing job.
"Recommendation: Log the data that has been processed when
"an RFC task is started and when it returns, so that the
"job can be restarted with unprocessed data.
WRITE msg.
"Remove server from further consideration for
"parallel processing tasks in this program.
"Get name of server just called...
CALL FUNCTION 'SPBT_GET_PP_DESTINATION'
EXPORTING
RFCDEST = TASKLIST-RFCDEST
EXCEPTIONS
OTHERS = 1.
"Then remove from list of available servers.
CALL FUNCTION 'SPBT_DO_NOT_USE_SERVER'
IMPORTING
SERVERNAME = TASKLIST-RFCDEST
EXCEPTIONS
INVALID_SERVER_NAME = 1
NO_MORE_RESOURCES_LEFT = 2
"No servers left in group.
PBT_ENV_NOT_INITIALIZED_YET = 3
OTHERS = 4.
WHEN 3.
"No resources (dialog work processes) available at
"present. You need to handle this exception, waiting
"and repeating the CALL FUNCTION until processing
"can continue or it is apparent that there is a
"problem that prevents continuation.
MESSAGE I837. "All servers currently busy.
"Wait for replies to asynchronous RFC calls. Each
"reply should make a dialog work process available again.
IF EXCP_FLAG = SPACE.
EXCP_FLAG = 'X'.
"First attempt at RESOURCE_FAILURE handling. Wait
"until all RFC calls have returned or up to 1 second.
"Then repeat CALL FUNCTION.
WAIT UNTIL RCV_JOBS >= SND_JOBS UP TO '1' SECONDS.
ELSE.
"Second attempt at RESOURCE_FAILURE handling
WAIT UNTIL RCV_JOBS >= SND_JOBS UP TO '5' SECONDS.
"SY-SUBRC 0 from WAIT shows that replies have returned.
"The resource problem was therefore probably temporary
"and due to the workload. A non-zero RC suggests that
"no RFC calls have been completed, and there may be
"problems.
IF SY-SUBRC = 0.
CLEAR EXCP_FLAG.
ELSE. "No replies
"Endless loop handling
ENDIF.
ENDIF.
ENDCASE.
ENDDO.
Wait for end of job: replies from all RFC tasks.
Receive remaining asynchronous replies
WAIT UNTIL RCV_JOBS >= SND_JOBS.
LOOP AT TASKLIST.
WRITE:/ 'Received task:', TASKLIST-TASKNAME COLOR 1,
30 'Destination: ', TASKLIST-RFCDEST COLOR 1.
ENDLOOP.
This routine is triggered when an RFC call completes and
returns. The routine uses RECEIVE to collect IMPORT and TABLE
data from the RFC function module.
Note that the WRITE keyword is not supported in asynchronous
RFC. If you need to generate a list, then your RFC function
module should return the list data in an internal table. You
can then collect this data and output the list at the conclusion
of processing.
FORM RETURN_INFO USING TASKNAME.
DATA: INFO_RFCDEST LIKE TASKLIST-RFCDEST.
RECEIVE RESULTS FROM FUNCTION 'RFC_SYSTEM_INFO'
IMPORTING RFCSI_EXPORT = INFO
EXCEPTIONS
COMMUNICATION_FAILURE = 1
SYSTEM_FAILURE = 2.
RCV_JOBS = RCV_JOBS + 1. "Receiving data
IF SY-SUBRC NE 0.
Handle communication and system failure
ELSE.
READ TABLE TASKLIST WITH KEY TASKNAME = TASKNAME.
IF SY-SUBRC = 0. "Register data
TASKLIST-RFCHOST = INFO_RFCHOST.
MODIFY TASKLIST INDEX SY-TABIX.
ENDIF.
ENDIF.
ENDFORM
regards
Arun -
Music app playlist keeps repeating even if repeat is off
Hi!
So when I go to sleep I usually play music from a playlist in the music app. I always make sure the 'repeat all' function is off, so the music doesn't keep playing all night long. But quite a few times, despite the 'repeat all' function being off, I still wake up in the middle of the night to find the music is still playing, hours after it should have stopped. The playlist I usually (fall to) sleep with is usually between 30 ~ 60 minutes but is still playing 3 ~ 4 hours later.
Anyone else here with the same problem? Is it a bug or just some random glitch?
Thanks in advance for any input on this!I have this exact same issue but it doesn't happen all the time!
-
Regarding ALV Function modules
Hi,
Can you please explain what is the difference betweeen slis_fieldcat_alv and slis_t_fieldcat_alv?
thnx
venkatHi
ABAP List Viewer
The common features of report are column alignment, sorting, filtering, subtotals, totals etc. To implement these, a lot of coding and logic is to be put. To avoid that we can use a concept called ABAP List Viewer (ALV).
This helps us to implement all the features mentioned very effectively.
Using ALV, We can have three types of reports:
1. Simple Report
2. Block Report
3. Hierarchical Sequential Report
There are some function modules which will enable to produce the above reports without much effort.
All the definitions of internal tables, structures and constants are declared in a type-pool called SLIS.
1. SIMPLE REPORT.
The important function modules are
a. Reuse_alv_list_display
b. Reuse_alv_fieldcatalog_merge
c. Reuse_alv_events_get
d. Reuse_alv_commentary_write
e. Reuse_alv_grid_display
A. REUSE_ALV_LIST_DISPLAY : This is the function module which prints the data.
The important parameters are :
I. Export :
i. I_callback_program : report id
ii. I_callback_pf_status_set : routine where a user can set his own pf status or change the functionality of the existing pf status
iii. I_callback_user_command : routine where the function codes are handled
iv. I_structure name : name of the dictionary table
v. Is_layout : structure to set the layout of the report
vi. It_fieldcat : internal table with the list of all fields and their attributes which are to be printed (this table can be populated automatically by the function module REUSE_ALV_FIELDCATALOG_MERGE
vii. It_events : internal table with a list of all possible events of ALV and their corresponding form names.
II. Tables :
i. t_outtab : internal table with the data to be output
B. REUSE_ALV_FIELDCATALOG_MERGE : This function module is used to populate a fieldcatalog which is essential to display the data in ALV. If the output data is from a single dictionary table and all the columns are selected, then we need not exclusively create the field catalog. Its enough to mention the table name as a parameter(I_structure name) in the REUSE_ALV_LIST_DISPLAY. But in other cases we need to create it.
The Important Parameters are :
I. Export :
i. I_program_name : report id
ii. I_internal_tabname : the internal output table
iii. I_inclname : include or the report name where all the dynamic forms are handled.
II Changing
ct_fieldcat : an internal table with the type SLIS_T_FIELDCAT_ALV which is
declared in the type pool SLIS.
C. REUSE_ALV_EVENTS_GET : Returns table of possible events for a list type
Parameters :
I. Import :
Et_Events : The event table is returned with all possible CALLBACK events
for the specified list type (column 'NAME'). For events to be processed by Callback, their 'FORM' field must be filled. If the field is initialized, the event is ignored. The entry can be read from the event table, the field 'FORM' filled and the entry modified using constants from the type pool SALV.
II. Export :
I_List_type :
0 = simple list REUSE_ALV_LIST_DISPLAY
1 = hierarchcal-sequential list REUSE_ALV_HIERSEQ_LIST_DISPLAY
2 = simple block list REUSE_ALV_BLOCK_LIST_APPEND
3 = hierarchical-sequential block list
REUSE_ALV_BLOCK_LIST_HS_APPEND
D. REUSE_ALV_COMMENTARY_WRITE : This is used in the Top-of-page event to print the headings and other comments for the list.
Parameters :
I. it_list_commentary : internal table with the headings of the type slis_t_listheader.
This internal table has three fields :
Typ : H header, S selection , A - action
Key : only when typ is S.
Info : the text to be printed
E. REUSE_ALV_GRID_DISPLAY : A new function in 4.6 version, to display the results in grid rather than as a preview.
Parameters : same as reuse_alv_list_display
This is an example for simple list.
2. BLOCK REPORT
This is used to have multiple lists continuously.
The important functions used in this report are:
A. REUSE_ALV_BLOCK_LIST_INIT
B. REUSE_ALV_BLOCK_LIST_APPEND
C. REUSE_ALV_BLOCK_LIST_HS_APPEND
D. REUSE_ALV_BLOCK_LIST_DISPLAY
A. REUSE_ALV_BLOCK_LIST_INIT
Parameters:
I. I_CALLBACK_PROGRAM
II. I_CALLBACK_PF_STATUS_SET
III. I_CALLBACK_USER_COMMAND
This function module is used to set the default gui status etc.
B. REUSE_ALV_BLOCK_LIST_APPEND
Parameters :
Export :
I. is_layout : layout settings for block
II. it_fieldcat : field catalog
III. i_tabname : internal table name with output data
IV. it_events : internal table with all possible events
Tables :
i. t_outtab : internal table with output data.
This function module adds the data to the block.
Repeat this function for all the different blocks to be displayed one after the other.
C. REUSE_ALV_BLOCK_LIST_HS_APPEND
This function module is used for hierarchical sequential blocks.
D. REUSE_ALV_BLOCK_LIST_DISPLAY
Parameters : All the parameters are optional.
This function module display the list with data appended by the above function.
Here the functions REUSE_ALV_FIELDCATALOG_MERGE, REUSE_ALV_EVENTS_GET, REUSE_ALV_COMMENTARY_WRITE can be used.
3. Hierarchical reports :
Hierarchical sequential list output.
The function module is
A. REUSE_ALV_HIERSEQ_LIST_DISPLAY
Parameters:
I. Export:
i. I_CALLBACK_PROGRAM
ii. I_CALLBACK_PF_STATUS_SET
iii. I_CALLBACK_USER_COMMAND
iv. IS_LAYOUT
v. IT_FIELDCAT
vi. IT_EVENTS
vii. i_tabname_header : Name of the internal table in the program containing the
output data of the highest hierarchy level.
viii. i_tabname_item : Name of the internal table in the program containing the
output data of the lowest hierarchy level.
ix. is_keyinfo : This structure contains the header and item table field
names which link the two tables (shared key).
II. Tables
i. t_outtab_header : Header table with data to be output
ii. t_outtab_item : Name of the internal table in the program containing the
output data of the lowest hierarchy level.
slis_t_fieldcat_alv : This internal table contains the field attributes. This internal table can be populated automatically by using REUSE_ALV_FIELDCATALOG_MERGE.
Important Attributes :
A. col_pos : position of the column
B. fieldname : internal fieldname
C. tabname : internal table name
D. ref_fieldname : fieldname (dictionary)
E. ref_tabname : table (dictionary)
F. key(1) : column with key-color
G. icon(1) : icon
H. symbol(1) : symbol
I. checkbox(1) : checkbox
J. just(1) : (R)ight (L)eft (C)ent.
K. do_sum(1) : sum up
L. no_out(1) : (O)blig.(X)no out
M. outputlen : output length
N. seltext_l : long key word
O. seltext_m : middle key word
P. seltext_s : short key word
Q. reptext_ddic : heading (ddic)
R. ddictxt(1) : (S)hort (M)iddle (L)ong
S. datatype : datatype
T. hotspot(1) : hotspot
Regards
Anji
Maybe you are looking for
-
Mac will no longer turn on - iMac G4 (Flat Panel)
I have an iMac G4 (Flat Panel) that will not turn on. I've tried to obvious things such as changing the power lead/fuse etc., but this hasn't solved it. If you hold the power button in you can hear a faint 'ticking' sound coming from inside the Mac,
-
Database upgrade process and step
Hi, I am trying to do as following: I have old server with 10.2.0.3 32 bits on Linux. We are trying to have RH Linux 5.4 64 bits and oracle 10.2.0.3 64 bits. How can i restore from 10.2.0.3 32 bits cold backup to new server? Thanks Pat Edited by: use
-
Connecting VGA Monitor to 2007 Macbook Pro
I am trying to connect my old 20" Princeton VGA monitor to my late 2007 Macbook Pro. I bought an adapter cord that fits perfectly but my Macbook Pro won't recognize that the monitor is there. I tried changing the resolution but it did not work. I ha
-
Attachments in interactive form
Hi, In online interactive form if I attache few files in the form and submit the data will these files will be appended in pdfsource of Interactive UI element? I have already tested pdfsource but there are no attachments only form with data is displa
-
PLEASE HELP ME!!!