Re: Prompt User to select from screen display options
Hi,
I need a FM whereby I could display possible values for User to select and then return to continue the processing.
User will need to click on the screen selection and then the OK icon.
Please assist.
Thanks
Hi Colin,
here a short example:
TYPE-POOLS: SLIS.
DATA: FIELDCAT TYPE SLIS_T_FIELDCAT_ALV,
WA_FIELDCAT TYPE SLIS_FIELDCAT_ALV.
SELFIELD TYPE SLIS_SELFIELD.
PROGNAME = SY-REPID.
Feldkatatalog vorbereiten auf Basis der ITAB-Definitionen
CALL FUNCTION 'REUSE_ALV_FIELDCATALOG_MERGE'
EXPORTING
I_PROGRAM_NAME = PROGNAME
I_INTERNAL_TABNAME = 'ITAB'
I_CLIENT_NEVER_DISPLAY = 'X'
I_INCLNAME = PROGNAME
CHANGING
CT_FIELDCAT = FIELDCAT
EXCEPTIONS
INCONSISTENT_INTERFACE = 1
PROGRAM_ERROR = 2
OTHERS = 3.
LOOP AT FIELDCAT INTO WA_FIELDCAT.
Für alle Spalten Key_Information ausschalten
MOVE ' ' TO WA_FIELDCAT-KEY.
Für alle Spalten nur Mittel_Text anzeigen.
MOVE 'M' TO WA_FIELDCAT-DDICTXT.
Für alle Spalten soll nicht 0 NICHT angezeigt werden.
MOVE 'X' TO WA_FIELDCAT-NO_ZERO.
Für alle Spalten Key_Information ausschalten
MOVE ' ' TO WA_FIELDCAT-KEY.
Spalte ausblenden
CASE WA_FIELDCAT-FIELDNAME.
WHEN 'MATNR.
MOVE 'X' TO WA_FIELDCAT-NO_OUT.
ENDCASE.
Spaltenüberschriften
CASE WA_FIELDCAT-FIELDNAME.
WHEN 'MAKTX'.
MOVE 'shorttext' TO WA_FIELDCAT-SELTEXT_M.
ENDCASE.
MODIFY FIELDCAT INDEX SY-TABIX FROM WA_FIELDCAT .
ENDLOOP.
CALL FUNCTION 'REUSE_ALV_POPUP_TO_SELECT'
EXPORTING
I_TITLE = 'Titel'
I_TABNAME = 'ITAB'
IT_FIELDCAT = FIELDCAT
IMPORTING
ES_SELFIELD = SELFIELD
TABLES
T_OUTTAB = ITAB
EXCEPTIONS
PROGRAM_ERROR = 1
OTHERS = 2.
it works very good. At first you have to fill the ITAB as you want.
Regards, Dieter
Similar Messages
-
I have frequently seen a screen appear that asks if I wasn't to use my acuras "HandsFreeLink" to handle a call or use the phone (and I think it gives one other option but I can't recall what that is). For some reason, my phone is defaulting to handling all the calls using the phone and will not route the call through the cars Bluetooth link so I can hear it through the cars sound system.
Well, the phone has to be connected via Bluetooth first. If it is connected, and you initiate the call from the phone, it should default to the bluetooth device. If it does not, then there should be a selection on the phone screen labeled "audio devices". This allows you to select how you want to handle the phone call audio. Your bluetooth device should be one of the selections.
-
I am building an internal table and displaying it as search help using F4IF_INT_TABLE_VALUE_REQUEST. How can I tell what line was selected from the search help? Only one field is filled with the selection, but there are several other fields attached to this that I need in my program - but I can't tell which line was selected, and the one field is not enough information to use to get the record from the internal table.
Hi,
RETURN_TAB would have the selected values.
FIELD_TAB will have the hit list fields.
DYNPFLD_MAPPING will have the Assignment of the screen fields to the internal table.
Regards, -
How to go to a certain page based on user's selection from a select list
On the very first page of my application, I have one item - a select list. Based on what they select from the list, how do I go to the corresponding page? For instance, if the user selects 'Metal', how do I go to the Metal page?
Hello,
Assuming the answer to Sergio is "yes"
First, you should make sure that the returned value from your select list is the corresponding page number or page alias for the user selection. Using your terms "Metal" should return the page number/alias of the page where you want to implement "Metal".
Then, on your first page, you can define a "Branch to Page Identify by Item". The parameter should be your select item name.
Regards,
Arie. -
How to prompt user to select multiple files in file dialog using scripts
Hi, is there a way to allow user to select multiple files inside the file dialog using scripts? So not just something like "*.ai" or "*.eps" but where the user can actually use their shift key to select a batch of files inside the file dialog and then the script would process each one.
Thanks!// Main Code [Execution of script begins here]
here's what I have so far. it would also be nice to not have illustrator stop at errors.. right now, it skips dialogs but on errors, it still stops.
// uncomment to suppress Illustrator warning dialogs
app.userInteractionLevel = UserInteractionLevel.DONTDISPLAYALERTS;
var destFolder, sourceFolder, files, fileType, sourceDoc, targetFile, pdfSaveOpts, folderName;
var fullPath = "";
var finalSlash;
// Select the source folder.
sourceFolder = Folder.selectDialog( 'Select the folder with Illustrator .ai files you want to convert to PDF');
f = find_files(sourceFolder);
function find_files (dir)
return find_files_sub (dir, []);
function find_files_sub (dir, array)
var f = Folder (dir).getFiles ("*.*");
for (var i = 0; i < f.length; i++)
if (f[i] instanceof Folder)
find_files_sub (f[i], array);
else
if (f[i].name.slice (-3).toLowerCase() == ".ai" || f[i].name.slice (-4).toLowerCase() == ".eps")
//convert the array-listing to a string so we can manipulate it
fullPath = String(f[i]);
//find the position of the last / to indicate where the filename starts
finalSlash = fullPath.lastIndexOf("/");
//get the foldername by "slicing" from start to where finalSlash is located
folderName = fullPath.slice(0, finalSlash).toLowerCase();
sourceDoc = app.open(f[i]); // returns the document object
// Call function getNewName to get the name and file to save the pdf
targetFile_PNG = getNewName(".png");
if(targetFile_PNG.exists) {
} else {
pngExportOpts = getPNGOptions();
sourceDoc.exportFile(targetFile_PNG, ExportType.PNG24, pngExportOpts );
targetFile_PDF = getNewName(".pdf");
pdfSaveOpts = getPDFOptions();
sourceDoc.saveAs(targetFile_PDF, pdfSaveOpts );
targetFile_SVG = getNewName(".svg");
svgSaveOpts = getSVGOptions();
sourceDoc.exportFile(targetFile_SVG, ExportType.SVG, svgSaveOpts );
sourceDoc.close();
array.push (f[i]);
getNewName: Function to get the new file name. The primary
name is the same as the source file.
function getNewName(ext)
var ext, docName, newName, saveInFile, docName, finalDot
var loop = 0;
docName = sourceDoc.name;
ext = ext; // new extension for pdf file
newName = "";
finalDot = sourceDoc.name.lastIndexOf(".");
while(loop < finalDot)
newName += docName[loop];
loop = loop + 1;
newName += ext; // full pdf name of the file
newName = newName.replace(" [Converted]","");
// Create a file object to save the pdf
saveInFile = new File( folderName + '/' + newName );
return saveInFile;
getPDFOptions: Function to set the PDF saving options of the
files using the PDFSaveOptions object.
function getPDFOptions()
// Create the PDFSaveOptions object to set the PDF options
var pdfSaveOpts = new PDFSaveOptions();
// Setting PDFSaveOptions properties. Please see the JavaScript Reference
// for a description of these properties.
// Add more properties here if you like
pdfSaveOpts.acrobatLayers = false;
pdfSaveOpts.colorBars = false;
pdfSaveOpts.colorCompression = CompressionQuality.AUTOMATICJPEGHIGH;
pdfSaveOpts.compressArt = true; //default
pdfSaveOpts.embedICCProfile = false;
pdfSaveOpts.enablePlainText = false;
pdfSaveOpts.generateThumbnails = false; // default
pdfSaveOpts.optimization = true;
pdfSaveOpts.pageInformation = false;
pdfSaveOpts.preserveEditability = true;
return pdfSaveOpts;
function getSVGOptions()
var svgSaveOpts = new ExportOptionsSVG();
//just using defaults aside from what's written below
//see http://cssdk.host.adobe.com/sdk/1.0/docs/WebHelp/references/csawlib/com/adobe/illustrator/ ExportOptionsSVG.html
svgSaveOpts.embedRasterImages = true;
svgSaveOpts.sVGTextOnPath = true;
return svgSaveOpts;
function getPNGOptions()
// Create the PDFSaveOptions object to set the PDF options
var pngExportOpts = new ExportOptionsPNG24();
// Setting PNGExportOptions properties. Please see the JavaScript Reference
// for a description of these properties.
// Add more properties here if you like
pngExportOpts.antiAliasing = true;
pngExportOpts.artBoardClipping = false;
pngExportOpts.horizontalScale = 100; // scaling to 350%
pngExportOpts.saveAsHTML = false;
pngExportOpts.transparency = true;
pngExportOpts.verticalScale = 100; // scaling to 350%
return pngExportOpts; -
Need applescript to search Itunes then prompt for a selection from the results of the search.
I have included my script below:
set myPrefsFile to (choose file with prompt "Select a file to read:")
set notfound to ((path to desktop folder) as string) & "notfound.txt"
open for access notfound with write permission
open for access myPrefsFile
set AppleScript's text item delimiters to {","}
set prefsContents to read myPrefsFile using delimiter {","}
close access myPrefsFile
set x to 0
set theplaylist to "Temp"
tell application "iTunes"
make new user playlist with properties {name:"Temp-1"}
end tell
repeat number of items in prefsContents times
set x to x + 1
set track_name to item x of prefsContents
tell application "iTunes"
get view of front window
tell library playlist 1
set search_results to (search for track_name)
copy search_results to theplaylist
end tell
repeat with a_track in search_results
duplicate a_track to playlist "Temp-1"
end repeat
end tell
if search_results = {} then write track_name to file notfound
end repeat
close access file notfoundProximity will become available if you're using a index (Tools > Document Processing > Full Text Index with Catalog), which you can create with Acrobat Pro for just this single document if you place it in a folder by itself. You will also have to select "match all words" or whatever the exact wording is in the advanced seach panel.
-
Prompt user to select radio button
Hello, LabView Fans
The vi attached is kind of working like I want it to but it
just seems to be more complicated than necessary. I’m using a radio button setup
with no selection and want to force the user to make a selection. If the selection
is not made; then prompt the user to make a selection. I’d like to have the vi
continue until a selection is made and the OK button pressed, but keep getting
into a run on situation.
Thanks for any critique / solutions to this small problem.
Solved!
Go to Solution.
Attachments:
MustMakeChoice.vi 13 KBHi Zilla,
here you go. This is a possible way to do it
Kind regards,
- Bjorn -
Have fun using LabVIEW... and if you like my answer, please pay me back in Kudo's
LabVIEW 5.1 - LabVIEW 2012
Attachments:
Colorpicker.vi 12 KB -
Prompt user to select multiple objects within an action
Hi there,
In illustrator, is it possible to select multiple objects within an action or prompt the user to do so when needed ?
I know about the note trick but I am not quite happy with this one. I would like another solution if there is any.
Thanks !!In order for a macro (Action) or script to select something, it has to have access to some criteria by which to target the object(s). Actions are much more limited in this regard than scripts, but there are some "hooks" you can employ.
For example, Actions will record the assignment of a Note in the Attributes palette. So if your Action at least starts with the object(s) of interest selected, you can take that opportunity to record the entry of a string in the Note field. Thereafter, if the object(s) become deselected, the Action (or another Action) can re-select them by means of the Select Object(s)... step. When manipulation of the target object(s) is done, you can record changing its note to nothing, to prevet its being seleced by the same Select Object(s)... step later.
JET -
Prompting User for Selection of Choice Again
Hi, i am now a student learning through some basics of the java, i would like to know, say i have the following code;
choice = CspInput.readInt();
switch(choice)
case 1: System.out.println("www");
break;
case 2: System.out.println("xxx");
break;
case 3: System.out.println("yyy");
break;
case 4: System.out.println("zzz");
break;
default: System.out.println("wrong choice");
break;
how do i command the programme to prompt the user to enter again if he/she enter a invalid code rather than ending the programme with "Process Complete"
please help me with it,thanks!i have alter the code such that it looks like this, but the output i want is such that i only want it to loop when the user enters a value that is less than 1,more than 4,how do i go about altering the code such that it does the job?
public static void main(String args[])
throws java.io.IOException {
int choice;
for(;;) {
do {
System.out.println("***************x,y or z?***************");
System.out.println("1) z");
System.out.println("2) y");
System.out.println("3) x");
System.out.println("4) Exit Program");
System.out.println("************************************************");
System.out.print("Please Select Your Choice (1-4) : ");
do {
choice = (int) System.in.read();
} while(choice == '\n' | choice == '\r');
} while( choice < '1' | choice > '3' & choice != '4');
if(choice == '4') break;
System.out.println("\n");
switch(choice) {
case '1':
System.out.println("zzz");
break;
case '2':
System.out.println("yyy");
break;
case '3':
System.out.println("xxx");
break;
System.out.println();
} -
Keyboard shortcut to open a cells pop-up menu and select from list of options.
I guessed Option-Return would be the shortcut from this, as it typically lets you edit a cells contents, but no. Read the keyboard Shortcuts list in Numbers>Help but didn't see anything.
Hi ts,
Thanks for drawing my attention to this! Let's add some missing detail…
While "you just press spacebar" to open the pop-up menu, that won't select a menu item.
After you've opened the menu, 'you could press the first letter' of an entry, ( 'like every other pop-up list on Earth,') or you could press the down arrow to step down the list (and the up arrow to step up, if you went beyond the item you wanted to choose).
And you can change your mind; the menu will stay open until you confirm your choice (by pressing the space bar again, OR by pressing return OR by pressing enter).
Note that pressing the first letter will select the 'smallest' item name beginning with that letter. To move to another item name starting with that letter, you'll need to use the up or down arrow key (or the mouse).
Thanks again for posting. With luck, WideEyedPupil will still be monitoring this discussion, and will see these posts.
Regards,
Barry -
I accidentally pushed a setting on my HP CP2025dn color printer which changed its language from English to something which does not even have words with an alphabet which I could translate. So I can't just push tabs and return the setting to English, since I can't read the options. I have tried reinstalling the printer driver, but this did not work. It seems I need to do something to the printer itself, but I can't figure out how to do anything when I can't read the screen.
Reset the page zoom on pages that cause problems: <b>View > Zoom > Reset</b> (Ctrl+0 (zero); Cmd+0 on Mac)
* http://kb.mozillazine.org/Zoom_text_of_web_pages
You can use one of these extensions to set a default font size and page zoom on web pages:
* Default FullZoom Level: https://addons.mozilla.org/firefox/addon/default-fullzoom-level/
* NoSquint: https://addons.mozilla.org/firefox/addon/nosquint/ -
I have an X1 Carbon.
Usually when i raise or decrease the screen brightness i had an on screen indicator showing me how much i decreased ot increasing either of the obove.. Now, when i do the same actions nothing apears.. can any one give me a hand?
thanks
Moderator Note: Edited subject to match content.Hi Joben,
Welcome to Lenovo Community Forums!
I’m sorry to hear that you are facing the issue with on screen Display on ThinkPad X1 Carbon.
Please check if the you have enabled on-screen display option in graphic properties. Please click here to know the steps for enabling on-screen display.
If the issue still persists then I suggest you to update Power Manager, Power management and Hot key feature applications.
Below is the link to enter the downloads page and download latest application accordingly, please click on "Select Product" then in "QUICK PATH" enter the MTM no. select the exact model.
http://support.lenovo.com/en_US/downloads/default.page#
Hope this helps!
Best regards,
Hemanth Kumar
Did someone help you today? Press the star on the left to thank them with a Kudo!
If you find a post helpful and it answers your question, please mark it as an "Accepted Solution"! This will help the rest of the Community with similar issues identify the verified solution and benefit from it.
Follow @LenovoForums on Twitter! -
Field Exit - How do I show list for user to select?
Hi,
I am writing a field exit for Group Asset on TCode AS01. The field exit will check a custom table to give the user an option to select values from a dropdown list.
Any suggestions on how to do this? I understand how to force a value in the field by putting it in OUTPUT, but not sure how to allow the user to select from a list?
Thanks!!!Thanks for the replies!
I'm not sure how to attach a search help to it because it is a field on a standard SAP screen that already has a search help.
This is probably not going to be very clean, but let me give more details as to what I'm trying to accomplish.
There is a field "Group Asset" that is on t-codes AS01, AS01, AS11. There is already a search help provided by SAP. The functional person wants me to create a field-exit to check a custom table based on Company Code, Cost Center, and Asset Class importing PIDs. If there is only one group asset that fits the criteria, then I will just place it in the field. If there are multiple group assets, then the user has to select which one and place it in the field.
I appreciate any suggestions. Thanks!!!
Mark -
ARQ: Manager Id manual selection from the list???
Hi,
I had discussed in my other thread here that, in some of the cases, a user may not have manager id for some reason either in HR or AD. For such users, the option is to select manager id manually from the list by pressing F4.
The problem is that, as soon as a manager id is searched, this will display "all" the users available in GRC system: requester, manager, role owner, other dialog users and even background users!
This causes the requester to select incorrect manager id and exposes all the irrelevant users from GRC system.
May I know how I can control this? Or do we have any other way to handle this?
As I know, there are following options:
1. Maintain users' details properly either in AD or SAP HR systems
2.In case of non-availability of manager id, route request to appropriate team/person who can take proper decision (which I have done currently)
Does any also suggest/endorse an idea to modify the default search ability of ARQ?
I would appreciate if we can have ideas/suggestions on this.
Would be waiting for kind responses.
Regards,
FaisalDear Alessandro,
Thanks for your reply.
Regarding :
I understand your concern regarding correct/wrong mangers. But in case that manager information is wrong in LDAP/HR from which source should GRC get the correct managers?
I would share on thing and that is, for contractors (for example) some how manager details are not maintained in LDAP (as in SAP HR only permanent employees' HR data is maintained).
I could not get the first 3 lines of next paragraph and I think this is not the issue
Basically you can say who ever is a manager can also be a manager from someone else. But it is possible that someone who is not yet a manager can be a new manager and has to be defined as manager in ARQ.
The issue that, for some type of employees (contractors), manager details are not maintained neither in LDAP nor in SAP HR system. Therefore, in such cases, manager field is empty. But let me tell you there are managers for even contractors, but not maintained in LDAP due to the maintenance responsibility and gathering this information from different department is assumed to be a big and painful task.
But these managers (for contractors) are definitely available in GRC system as approvers. Therefore, for users (contractors) whose manager is not maintained, manually it is to be selected from the search option. If we start searching for a "suitable" manager, then it displays all the users available in GRC system (because they are created in SU01).
Also, we might face similar problem at the time of forwarding a request! Actually, a manager should only see the list of other managers, not all users!
Similarly, a role owner will intend to forward his responsibility to another role owner only!
Therefore, we should only see the relevant users from the search, but not all!
Please share your valuable inputs.
Regards,
Faisal -
Hi,
I have select-options: s_matnr for mchb-matnr &
s_pradh for mara-pradh & s_wdatu for lqua-wdatu.
I want to select records from mchb(matnr,wekrs,lgort)
, mara(matnr,pradh) and lqua(matnr,wdatu)
can any one tell me how do i achieve this?
points guaranteed..
cheers
kakiHi,
Here is my program...
I have five select-options...
s_matnr,s_werks,s_lgort,s_wdatu,s_prdha.
So end user can select any of this options.Iam trying to write select statements based on this.
REPORT YMINVAGE no standard page heading
line-size 145
line-count 65
message-id Z1.
tables : mchb, "Batch Stocks
mara, "Material Master
mseg,
lqua, "Storage bin location
mvke.
data: begin of t_mchb occurs 0,
matnr like zpartcnv-zzpartfj,
matnr like mara-matnr,
werks like mchb-werks,
lgort like mchb-lgort,
ersda like mchb-ersda, " creation date
charg like mchb-charg, " Batch Number
clabs like mchb-clabs, " unrestricted quantity
cspem like mchb-cspem, " Blocked stock
prdha like mara-prdha, " product hierarchy
wdatu like lqua-wdatu, " gr date
qty type i,
price(8) type p decimals 2,
amount(8) type p decimals 2,
end of t_mchb.
data: begin of t_qty occurs 0,
matnr like mchb-matnr,
werks like mchb-werks,
lgort like mchb-lgort,
wdatu like lqua-wdatu,
clabs like mchb-clabs,
cspem like mchb-cspem,
charg like mchb-charg,
price(8) type p decimals 2,
qty30 like mchb-clabs,
qty60 like mchb-clabs,
qty90 like mchb-clabs,
qtyful like mchb-clabs,
amt30 like mseg-dmbtr,
amt60 like mseg-dmbtr,
amt90 like mseg-dmbtr,
amtful like mseg-dmbtr,
end of t_qty.
data: begin of t_coll occurs 0,
matnr like mchb-matnr,
werks like mchb-werks,
lgort like mchb-lgort,
clabs like mchb-clabs,
cspem like mchb-cspem,
charg like mchb-charg,
amount(8) type p decimals 2,
date30 type d,
date60 type d,
date90 type d,
fdate type d,
end of t_coll.
data: begin of t_mara occurs 0,
matnr like mara-matnr,
prdha like mara-prdha,
end of t_mara.
data : zukurs type p decimals 3,
zffact like tcurr-ffact,
ztfact like tcurr-tfact.
selection-screen begin of block sel with frame title text-001.
select-options : s_matnr for mchb-matnr.
select-options : s_prdha for mara-prdha.
select-options : s_werks for mchb-werks.
select-options : s_lgort for mchb-lgort.
select-options : s_wdatu for lqua-wdatu.
selection-screen end of block sel.
selection-screen begin of block sel1 with frame title text-002.
parameters: p_actstk radiobutton group g1 default 'X',
p_blkstk radiobutton group g1.
selection-screen end of block sel1.
call function 'Z_FILL_MATNR_SELTAB'
TABLES
s_matnr = s_matnr.
start-of-selection.
perform get_data.
perform process_data.
perform display_data.
top-of-page.
perform set_page_header.
*& Form process_data
text
form get_data.
select matnr prodh from mvke into table t_mara where
matnr in s_matnr and
prodh in s_prdha.
select * into corresponding fields of table t_mchb
from mchb
inner join mara
on mchbmatnr = maramatnr
inner join lqua
on mchbmatnr = lquamatnr
and mchbwerks = lquawerks
where mchb~matnr in s_matnr
and mara~prdha in s_prdha
and lqua~wdatu in s_wdatu.
loop at t_mara.
CALL FUNCTION 'CONVERSION_EXIT_MATN1_OUTPUT'
EXPORTING
INPUT = t_mara-matnr
IMPORTING
OUTPUT = t_mara-matnr.
modify t_mara.
endloop.
CHECK NOT t_mara[] IS INITIAL.
if p_actstk = 'X'.
select matnr werks lgort ersda charg clabs
into corresponding fields of table t_mchb from mchb
FOR ALL ENTRIES IN t_mara
where matnr = t_mara-matnr and
werks in s_werks and
lgort in s_lgort and
clabs > 0.
else.
select matnr werks lgort ersda charg clabs
into corresponding fields of table t_mchb from mchb
FOR ALL ENTRIES IN t_mara
where matnr = t_mara-matnr and
werks in s_werks and
lgort in s_lgort and
cspem > 0.
endif.
loop at t_mchb.
for date of goods receipt
select single * from lqua where matnr = t_mchb-matnr and
werks = t_mchb-werks and
charg = t_mchb-charg and
wdatu in s_wdatu.
t_mchb-wdatu = lqua-wdatu.
if sy-subrc = 0.
modify t_mchb.
clear t_mchb.
endif.
endloop.
loop at t_mchb.
for unit price
select single * from mseg where matnr = t_mchb-matnr and
charg = t_mchb-charg and
werks = t_mchb-werks.
clear zukurs.
perform get_usd.
if zukurs <> 0.
t_mchb-price = ( mseg-dmbtr / mseg-menge ) / ( zukurs / 100 ).
else.
t_mchb-price = ( mseg-dmbtr / mseg-menge ) / '1.6'.
endif.
if sy-subrc = 0.
modify t_mchb.
clear t_mchb.
endif.
endloop.
if sy-subrc ne 0.
message i016.
leave list-processing.
endif.
loop at t_mchb.
t_coll-matnr = t_mchb-matnr.
t_coll-werks = t_mchb-werks.
t_coll-lgort = t_mchb-lgort.
append t_coll.
clear t_coll.
endloop.
sort t_coll.
delete adjacent duplicates from t_coll.
endform. "get_data
*& Form process_data
text
form process_data.
data:age type d.
data: g_qty30 type i,
g_qty60 type i,
g_qty90 type i,
g_qtyful type i,
g_amt30 like t_qty-amt30,
g_amt60 like t_qty-amt30,
g_amt90 like t_qty-amt30,
g_amtful like t_qty-amt30.
loop at t_coll.
loop at t_mchb where matnr = t_coll-matnr
and werks = t_coll-werks
and lgort = t_coll-lgort.
age = t_mchb-wdatu.
if age lt 31.
if p_actstk = 'X'.
g_qty30 = g_qty30 + t_mchb-clabs.
else.
g_qty30 = g_qty30 + t_mchb-cspem.
endif.
elseif age gt 30 and age lt 61.
if p_actstk = 'X'.
g_qty60 = g_qty60 + t_mchb-clabs.
else.
g_qty60 = g_qty60 + t_mchb-cspem.
endif.
elseif age gt 60 and age lt 91.
if p_actstk = 'X'.
g_qty90 = g_qty90 + t_mchb-clabs.
else.
g_qty90 = g_qty90 + t_mchb-cspem.
endif.
else.
if p_actstk = 'X'.
g_qtyful = g_qtyful + t_mchb-clabs.
else.
g_qtyful = g_qtyful + t_mchb-cspem.
endif.
endif.
endloop.
for amount calculation
if t_mchb-price = '0.00'.
t_mchb-price = '1'.
endif.
g_amt30 = g_qty30 * t_mchb-price.
g_amt60 = g_qty60 * t_mchb-price.
g_amt90 = g_qty90 * t_mchb-price.
g_amtful = g_qtyful * t_mchb-price.
t_qty-amt30 = g_amt30.
t_qty-amt60 = g_amt60.
t_qty-amt90 = g_amt90.
t_qty-amtful = g_amtful.
t_qty-matnr = t_mchb-matnr.
t_qty-werks = t_mchb-werks.
t_qty-lgort = t_mchb-lgort.
t_qty-wdatu = t_mchb-wdatu.
t_qty-clabs = t_mchb-clabs.
t_qty-cspem = t_mchb-cspem.
t_qty-price = t_mchb-price.
*for quantities
t_qty-qty30 = g_qty30.
t_qty-qty60 = g_qty60.
t_qty-qty90 = g_qty90.
t_qty-qtyful = g_qtyful.
if g_qty30 ne 0 or g_qty60 ne 0
or g_qty90 ne 0 or g_qtyful ne 0.
append t_qty.
endif.
clear t_qty.
clear: g_qty30, g_qty60, g_qty90, g_qtyful,
g_amt30, g_amt60, g_amt90, g_amtful.
endloop.
sort t_qty by wdatu.
endform. "process_data
*& Form display_data
text
form display_data.
data: count type i.
data: l_ind value '1'.
loop at t_qty.
count = count + 1.
if l_ind = '1'.
l_ind = '0'.
format color col_total intensified off .
else.
l_ind = 1.
format color col_normal.
endif.
write:/1(24) t_qty-matnr color 2,
24(4) t_qty-werks,
32(4) t_qty-lgort.
WRITE:41(1) SY-VLINE NO-GAP.
WRITE:68(1) SY-VLINE NO-GAP.
WRITE:95(1) SY-VLINE NO-GAP.
WRITE:119(1) SY-VLINE NO-GAP.
if age < 31.
write: 42(13) t_qty-qty30,
55(13) t_qty-amt30.
elseif age < 61.
write: 69(11) t_qty-qty60,
84(11) t_qty-amt60.
elseif age < 91.
write: 96(11) t_qty-qty90,
108(11) t_qty-amt90.
else.
write: 120(11) t_qty-qtyful,
131(12) t_qty-amtful.
endif.
endloop.
uline.
write count.
endform. "display_data
*& Form GET_USD
text
form get_usd.
call function 'READ_EXCHANGE_RATE'
exporting
date = lqua-wdatu
foreign_currency = 'USD'
local_currency = 'SGD'
type_of_rate = 'M'
importing
exchange_rate = zukurs
foreign_factor = zffact
local_factor = ztfact
valid_from_date =
exceptions
no_rate_found = 1
no_factors_found = 2
no_spread_found = 3
others = 4.
endform. " GET_USD
*& Form set_page_header
text
FORM set_page_header.
call function 'Z_REPORT_TITLE'
EXPORTING
line_size = sy-linsz
sy_title = 'Inventory Aging Report'
uline = 'X'
first_page_only = ' '.
write:/1(145) space color 1.
write :1(20) 'Material' color col_heading,
23(9) 'Plant' color col_heading,
31(15) 'Str.loc' color col_heading,
51(18) '0 - 30 days' color col_heading,
76(18) ' 31 - 60 days ' color col_heading,
100(15) ' 61 - 90 days ' color col_heading,
125(14) ' > 91 days ' color col_heading.
write:/1(145) space color 1.
write:48(11) 'Qty' color col_heading,
58(10) 'Amnt(USD)' color col_heading.
write:73(10) 'Qty' color col_heading,
82(10) 'Amnt(USD)' color col_heading.
write:98(10) 'Qty' color col_heading,
108(10) 'Amnt(USD)' color col_heading.
write:122(10) 'Qty' color col_heading,
132(10) 'Amnt(USD)' color col_heading.
uline.
endform. "set_page_header
Maybe you are looking for
-
Session variable causing ADODB.Field error '800a0bcd'
i have a page that before the session variable was added, would display the text i required if the recordset was empty. Now i have a session variable on the same page and if the recordset is empty, instead of showing the text i need displayed, i get
-
Terrible download speed with Infinity 2 (less than...
I was a relatively early adopter of BT infinity. When I first signup I recieved a consistent 70mbps+ down 80mbps up. Over the last few months this has dropped to around 40mbps down and 12mbps up. I posted here regarding the issue, contacted BT, and
-
How to allow a max of 4 chars to be typed in gui textfield
I have textfields in my gui which i only want to allow the user to type in 4 numeric digits...is there a way to set some textfield property so that it will not hold more than 4 digits.
-
Switching between LinkedList and Array
Hi, I'm new to OOP and Java so please bear with me. I've been given an assignment to code my own collection similar to the Java Collection. It has to have sorted arrays, unsorted arrays, sorted linked lists and unsorted linked lists. Basically, the u
-
Quick Menu not opening up correctly
Whenever I try to open up Quick menu the program will load and show up in the system tray but overlay with all the buttons will not come up at all. It had worked fine before restarting the computer but now nothing. I have tried to uninstall and reins