Calculation in screen painter
Hi Friends,
I want to do a calculation in the input screen which I have created. ie., the amount field should be rate field * qty field. I am getting this value, but the problem I am facing is that, whe the qty is changed, it creates another line with changed qty as well as amount.
Could you pls guide me with corrections.
The code I have written, are as follows:
PROCESS AFTER INPUT.
*&SPWIZARD: PAI FLOW LOGIC FOR TABLECONTROL 'RATE'
LOOP AT IT_RATE.
CHAIN.
FIELD ZTDRDMG-MATRL.
FIELD ZTDRDMG-DMQTY.
FIELD ZTDRDMG-CLRAT.
FIELD ZTDRDMG-CLAMT.
MODULE RATE_MODIFY ON CHAIN-REQUEST.
endchain.
ENDLOOP.
= = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = =
MODULE RATE_MODIFY INPUT.
MOVE-CORRESPONDING ZTDRDMG TO G_IT_RATE_WA.
MODIFY IT_RATE
FROM G_IT_RATE_WA "IT_RATE
INDEX RATE-CURRENT_LINE.
g_it_rate_wa-clamt = g_it_rate_wa-dmqty * g_it_rate_wa-clrat.
APPEND G_IT_RATE_WA TO IT_RATE.
ENDMODULE. "RATE_MODIFY INPUT
= = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = =
Kindly guide me with a solution.
TIA.
Regards,
Mark K
try like this.
screen flow logic.
PROCESS BEFORE OUTPUT.
LOOP WITH CONTROL <CONTROL NAME>.
MODULE READ_TABLE.
ENDLOOP.
PROCESS AFTER INPUT.
LOOP WITH CONTROL <CONTROL NAME>
MODULE MODIFY_ITAB.
ENDLOOP.
MODULE READ_TABLE.
READ TABLE <ITAB> INDEX <CONTROL>-CURRENT_LINE.
IF SY-SUBRC = 0.
MOVE-CORRESPONDING ITAB TO ZTDRDMG.
ELSE.
<EXIT FROM LOOP>.
ENDIF.
ENDMODULE.
MODULE MODIFY_ITAB.
MOVE-CORRESPONDING ZTDRDMG TO <ITAB>
<DO THE CALCULATION>.
MODIFY ITAB INDEX <CONTROL>-CURRENT_LINE.
ENDMODULE.
hope this will help
regards
shiba dutta
Similar Messages
-
Can any one send me the program to create a calculator in screen painter.
Hi,
Check the Function module FITRV_CALCULATOR.
Using this you can get the idea of creating your own calculator.
Regards,
Sesh -
Percentage calculation in reprot painter
Friends,
When i am doing percentage calculation in report painter ex: A/B *100, it is giving rounded value like 28% instead of 28.5 or 28.6. Any idea where i need to make changes.
Points will be assigned
ThanksGo to the Formatting-->Columns link in GRR2 screen. On the pop up screen maintain the decimal places you want.
Regards,
Vishal Thakur -
Unwanted Extra Zeros in Output - Screen Painter Variable Field
I made this program to leanr screen painting which is a calculator. It all works fine but any calculation I do has extra zeros I don't want for example,
If I do 3.5 divide by 0.5 it shold give me an answer of 7.00 but it appears like 00000000007.00 and I can't figure out why. My fields for this output and the input are set to DEC - Decimal type.in the screen painter. My variables are specified to two decimals. So whats with these extra zeros?
Thanks in Advance.Hi James,
In the fields attributes, tab program, have a look if "Leading zeroes" checkbox is checked. It should not be.
Regards,
Custodio -
Error while opening a screen painter
Hi all,
I am trying to modify a screen in SE80. But when i am clicking on the screen painter it shows 'EU_SCRP_WN32 : timeout during allocate / CPIC-CALL: 'ThSAPCMRCV'
Message no. 37033. Please let me know how to resolve this issue. Thanks a lot for your help!
Regards,
PritiFor the Future Problem Facers:
I too faced the same problem and the below steps helped me.
Re: SFLIGHT is NOT defined for the current logical database.
You can check the completeness of the program installation by starting the program gneux.exe locally in the SAPGUI directory (for example, by double-clicking on the program name in the Explorer window).The Layout Editor is displayed with German texts and an empty drawing area for the pseudo screen EUSPDYND 0000.
If the installation is not complete, an error dialog box provides information regarding the cause of the error, for example, sometimes the DLL eumfcdll.dll is missing after reinstalling the SAPGUI. For example, the eumfcdll.dll DLL was sometimes missing after the SAPGUI was reinstalled. -
F4_FILENAME in search help in screen painter
Hello gurus,
I want to design a screen in which the text input field is used to get file name. For that i need to enable file search in local folders and drives with f4 key press. I wish to use the functionality of function module 'F4_FILENAME" in screen painter. How can i do that?
I tried creating search help for RLGRAP structure. It compiles fine but gives the message 'No inout for selection'.
What should i do?Thank you all,
The problem has been solved.
I am posting the final code.
1. In se38, i created program zprogram.
2. In se51, i created a screen for the program zprogram.
3. In layout, i took 2 buttons and one input/output field.
1st button for import and 2nd button for exit.
4.In flow logic-
i wrote the follwing code.
PROCESS BEFORE OUTPUT.
MODULE STATUS_100.
PROCESS AFTER INPUT.
PROCESS ON VALUE-REQUEST.
FIELD FILENAME1 MODULE F4_FILE_SEARCH.
5. IN THE MAIN PROGRAM
i wrote the following code-
REPORT ZPROGRAM.
DATA: FILENAME1 TYPE RLGRAP-FILENAME,
OK_CODE TYPE SY-UCOMM.
CALL SCREEN 100.
MODULE F4_FILE_SEARCH INPUT.
OK_CODE = SY-UCOMM.
CALL FUNCTION 'F4_FILENAME'
EXPORTING
FIELD_NAME = 'FILENAME1'
IMPORTING
FILE_NAME = FILENAME1
ENDMODULE.
MODULE STATUS_100 OUTPUT.
CASE OK_CODE.
WHEN 'IMPORT'.
MESSAGE 'THE FILE IS RECIEVED' TYPE 'I'.
WHEN 'CANCEL'.
LEAVE PROGRAM.
ENDCASE.
ENDMODULE.
I REFERRED TO THE DEMO PROGRAM MENTIONED
IN OTHER POST
NAME OF THE DEMO PROGRAM IS - DEMO_DYNPRO_F4_HELP_MODULE -
How to create a drop down box and text box in screen painter?
Hi i am totally new to this concept of screen painter..please can any tell me
how to create drop down box in screen painter?
How to create or display default date and time values?
How to create text box for giving comments?
How to store the records that we are entering in a table?
Please can any one send me the procedure for creating all these its very urgent useful information will be surely rewarded.Hi,
Check all these.
1.how to create drop down box in screen painter?
To get Drop Drown Box on screen .
Follow these steps.
1.
Go to T.Code SE51 and Select Laypout for the Screen.
2.
Double click on the field for which u want Dropdown box.
3.
Then U will see Name ,Text ,DROPDOWN.Click on that and select List Box or ListBox with key . Better to to select first one.
4.
Save and Activate ur screen .
5.
Enter the following piece of code in the PBO of the screen.(Change for ur requirement).
6.
The following code should be written under PROCESS BEFORE EVENT in the MODULE.
TYPE-POOLS :vrm.
DATA:
i_natio TYPE vrm_values, "-->Table that is passed through FM vrm_set_values
w_natio LIKE LINE OF i_natio.
DATA:
BEGIN OF i_t005t OCCURS 0,
land1 TYPE t005t-land1,
natio TYPE t005t-natio,
END OF i_t005t.
IF i_t005t[] IS INITIAL.
SELECT land1 natio
FROM t005t
INTO TABLE i_t005t
WHERE spras = sy-langu.
IF sy-subrc = 0.
LOOP AT i_t005t .
w_natio-key = i_t005t-land1.
w_natio-text = i_t005t-natio.
APPEND w_natio TO i_natio.
CLEAR w_natio.
ENDLOOP.
ENDIF.
ENDIF.
CALL FUNCTION 'VRM_SET_VALUES'
EXPORTING
id = 'I_IT0002-NATIO' "-->Field for which dropdown is needed.
values = i_natio
EXCEPTIONS
id_illegal_name = 1
OTHERS = 2.
IF sy-subrc <> 0.
* MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
* WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
2.1.How to create or display default date and time values?
1.
create input field for DATE and TIME on screen.ex. DATE1 and TIME1 are screen field names .
2.
Just assign SY-DATUM to DATE1 and SY-UZEIT to TIME1 under PROCESS BEFORE EVENT.
3.How to create text box for giving comments?
1.
Define one variable in the TOP include with type STRING means Global variable.
2.
Create one input field by giving screen field name which u have defined in the above step.
4.How to store the records that we are entering in a table?
For this case.. Create one table control. you can select one record and create record in the Z table by pressing button on Application toolbar..
Check the following steps to handle Table control.
1).
U should take one variable in your internal table or in structure which
is used for table control fields
ex :
data :
begin of itab occurs 0 ,
mark type c , "This is to select the record.
matnr like mara-matnr ,
matkl like mara-matkl,
maktx like makt-maktx,
end of itab .
Controls: TABC types TABLEVIEW using screen 100.
2).
This mark variable should be given in Table control properties.
follow the path
double click on the table control-->attributes .->select
w/SelColumn and in that itab-mark. Check in the figure.
[Table control properties screen|http://bp2.blogger.com/_O5f8iAlgdNQ/R99gOUH8CXI/AAAAAAAAA9I/d3gOum1fJ6s/s1600-h/pic28145-796618.jpg]
3).
After that. Take this example.
PROCESS BEFORE OUTPUT.
MODULE STATUS_0100.
LOOP AT ITAB WITH CONTROL tabc
ENDLOOP.
PROCESS AFTER INPUT.
MODULE CANCEL AT EXIT-COMMAND.
LOOP AT ITAB.
Module read_table_control.
ENDLOOP.
module user_command_0100.
In this Module read_table_control, You should write the following code
MODULE read_table_control INPUT.
MODIFY itab INDEX tabc-current_line."( This will update the
"ITAB table MARK field with 'X ' whatever we have selected
"on table control.)
ENDMODULE.
4)
If you want to Delete some of the records from Table control
follow this code Create one pushbutton and give Fucnction code to that
and write below code
CASE OKCODE.
WHEN 'CREATE'.
LOOP AT itab WHERE mark = 'X'.
"Use UPDATE statement to create new record.
ENDLOOP.
ENDCASE.
I hope that you will get something.
Regards,
Venkat.O -
Is it possible to display the standard function keys in screen painter
Hi ,
I design a screen in se51 where I use push buttons and input/output buttons and so on in the layout, here in the layout or in my final output screen(when i assign this screen to a transaction) I would like to display other standard keys, ie the function keys and application toolbar items. I would like to know whether there is a possibility to do this , if yes then how?
In a menu painter there is a possibility where I can customize the keys or I can use the standard keys by going to se41 extras->adjust template. Is there similar possibilities in the screen painter.Ok I see. I should use &var.
Edited by: xerosaburu on Aug 18, 2009 11:37 AM -
Is there any possible to display the text in big font in screen painter
HI all!
i want to display the text in the large size in the text field in the screen painter in the odule pool programing.Is there any possible.What i have to do in the screen painter to display the text in the large size.Also is there any possible to put the color for the text.Give me replyHI
CALL METHOD o_dyndoc_id->initialize_document
EXPORTING
background_color = cl_dd_area=>col_tree_level1.
DATA : dl_text(255) TYPE c. "Text
CALL METHOD o_dyndoc_id->add_text
EXPORTING
text = 'Flight Details'
sap_style = cl_dd_area=>heading
sap_fontsize = cl_dd_area=>large
sap_color = cl_dd_area=>list_heading_int.
* Display document
CALL METHOD o_dyndoc_id->display_document
EXPORTING
reuse_control = 'X'
parent = cont
EXCEPTIONS
html_display_error = 1.
IF sy-subrc NE 0.
ENDIF.
by using these methods you can achieve i hope..
have a good day.
regards
sarves -
Issue with Screen Painter Add-On after patch updation
Hi Experts,
We are using 2007 B PL10. We upgraded to PL 11 and now we are getting the following error while trying to start the Screen Painter Add-On.
"Wrong Executable digital signature for Add-on"
Please help!
Thanks in advance
Ajith GHi Ajith,
Check the thread
Installing addons on client
Regards
Jambulingam.P -
Passing the values from selection screen to screen painter
Hello Friends,
I'm making one report program in which im calling one screen which i have designed, in my selection screen there is a select option for customer tht accepts value range now i want to select all the customers entered in select options and pass these values in screen(screen painter).
pls guide me how this can be done.
Regards,
SunnyScreen painter is a tool in ABAP dev workbench used to create the screens using the
T-code SE51. In the screen painter, you can define the following interface elements with their associated attributes.
1. Input/Output Fields
2. Field Names
3. Checkboxes
4. Radio Buttons
5. Group Boxes
6. Sub screens.
7. Pushbuttons with No Fixed Position
Create a Z program in tcode SE38.
Go to transaction SE51.
Enter the created program name and screen number.
Click on flowlogic tab.
Uncomment the statement u201C MODULE STATUS_0100 u201C.
CASE SY-UCOMM.
WHEN 'EXIT'.
LEAVE PROGRAM.
WHEN 'BACK'.
LEAVE PROGRAM.
WHEN 'DISPLAY'.
SELECT SINGLE Fileds to selsct
INTO (interanl table or tablename-fileds)
WHERE Condition. WHEN 'CLEAR'.
CLEAR table.
ENDCASE.
ENDMODULE. -
How to show screen design in .srf (from Screen Painter) using SDK?
How to show screen design in .srf (from Screen Painter) using SDK?
You need to use the LoadBatchActions method of the Application object to load .SRF files.
John. -
How to insert tabstrip control in module pool screen painter
Hi all!
plz tell e how to use tabstrip control in module pool screen painter.Also plz give me an example program using tabstrip control.To insert tabstrip just open layout of screen and press on the tabstrip button there .
Use this souce code further to activate it .
CONTROLS tabstrip TYPE TABSTRIP.
DATA: okcode TYPE sy-ucomm,
dynnr TYPE sy-dynnr,
flag type flag,
active like tabstrip-activetab .
call SCREEN 100.
*& Module USER_COMMAND_0100 INPUT
text
MODULE USER_COMMAND_0100 INPUT.
data: lv_okcode type syucomm.
lv_okcode = okcode.
clear okcode.
case lv_okcode.
WHEN 'TAB1'.
dynnr = '0110'.
WHEN 'TAB2'.
dynnr = '0120'.
WHEN 'TAB3'.
dynnr = '0130'.
WHEN 'TAB4'.
dynnr = '0140'.
WHEN 'TAB5'.
"check authorization, if authorization fails
flag = 'X'. "set the global flag
active = 'TAB1'. "store active tab in global variable
dynnr = '0110'. "set the screen number
WHEN 'BACK' or 'EXIT'.
leave program.
ENDCASE.
IF lv_okcode(3) = 'TAB'.
tabstrip-activetab = lv_okcode.
ENDIF.
ENDMODULE. " USER_COMMAND_0100 INPUT
*& Module STATUS_0100 OUTPUT
text
MODULE STATUS_0100 OUTPUT.
SET PF-STATUS 'MAIN'.
SET TITLEBAR 'xxx'.
IF tabstrip-activetab IS INITIAL OR
dynnr IS INITIAL.
tabstrip-activetab = 'TAB1'.
dynnr = '0110'.
ENDIF.
"set the activetab explicilty here
if flag eq 'X'. "from authorization failure
tabstrip-activetab = active. "'TAB1'
clear flag.
endif.
ENDMODULE. " STATUS_0100 OUTPUT -
How to read the contents of Input Field created via Screen Painter?
Hi All,
I have a module program / dialog program, on my second screen, I created an input/outbox field via screen painter of course,
now in my PAI, how can I read the contents of the input/outbox field?
Let's say the name of my input/outbox field is: P_WEKRS. Note: Get Parameter and Set Parameter is ticked.
PROCESS AFTER INPUT.
LOOP WITH CONTROL TC_DATA.
MODULE MODIFY_DATA.
ENDLOOP.
I want to get the value of the input/outbox field before my loop in table control? I thought that it will work like normal parameter in non-dialog programs.
Any helpful inputs will be appreciated/rewarded.
Thanks.
JaimeHi, Jaime
Do the following Change in you Follow Logic
PROCESS AFTER INPUT.
MODULE read_or_change_value. " Add this
LOOP WITH CONTROL TC_DATA.
MODULE MODIFY_DATA.
ENDLOOP.
Add the Bellow Module code in you Driver Program.
MODULE read_or_change_value.
DATA: P_WEKRS like " the Field on Screen. Must be the same name as on SCREEN. and Type must be same too.
" Here you will find the Value in that Variable or if you will change the Value here you will find it change on Screen
END MODULE.
Please Reply if any Issue..
Best Regards,
Faisal -
How to swap fields in screen painter.
hello gurus,,
how to swap fields in screen painter.Hi
Go through the link given below :
http://www.standardware.com/pdf/stdwsp.pdf
With Regards
Nikunj Shah
Maybe you are looking for
-
Calling all SSRS users! May TechNet Gurus announced!
The results for May's TechNet Guru competition have been posted! http://blogs.technet.com/b/wikininjas/archive/2014/01/16/technet-guru-awards-december-2013.aspx Congratulations to all our new Gurus for May! We will be interviewing some of the winners
-
Gettting error while trying to upload an xml in oracle report builder11g
REP-0069: An internal error occured. JDBCPDS-62008 : java.lang.NullPointerException This is the error m getting while trying to upload an xml with the option Open an existing report in Oracle Forms and Reports 11g An xml to be uploaded is as follows
-
Snow Leopard - Save as PDF file size
Since my Acrobat Printer no longer works after upgrading to Snow Leopard, when I "save as PDF" the file size is several times what the output used to be using the Printer. So saving Illustrator or InDesign files where the Mac OS PDF printer can't be
-
Can't export Pages document to PDF
I have been trying to export a Pages document to PDF a number of times and get the following message: "The application Pages quit unexpectedly." I have rebooted and still can't export. Can anyone help, please? Thanks so much.
-
Can not down load I0s7 due not enough memory on my iphone5 how can i free up more memory?
can not down load I0s7 due not enough memory on my iphone5 how can i free up more memory?