2008 May 22 6:31 AM
Hi SAP-ABAP Experts .
Boss Please suggest me that i have to create a Screen in which only one Push Buton ,
As user Click this Push Button , a report should run and give it's output , the point is how selection screen will get a
perticular input when user will click this Push Button .
How to do this Boss .?
For Ex : program's Selection Screen has two input parameters
A = 5
B = 4
output of the report : C = 10 .
Requirement is when user click Puch Button , it will get out put C = 10 .
My Best Regards : rajneesh .
Hi SAP-ABAP Experts .
Boss Please suggest me that i have to create a Screen in which only one Push Buton ,
As user Click this Push Button , a report should run and give it's output , the point is how selection screen will get a
perticular input when user will click this Push Button .
How to do this Boss .?
For Ex : program's Selection Screen has two input parameters
A = 5
B = 4
output of the report : C = 10 .
Requirement is when user click Puch Button , it will get out put C = 10 .
My Best Regards : rajneesh .
2008 May 22 6:33 AM
Hi,
Use Module pool program for this.
SAP ABAP Tutorial: Module Pool Programming. Part 2
Once the program 'ZSALESORDSCREEN' is created Saved and Activated, run Transaction SE51.
Enter screen number '9000'
Screen numbers can be up to 4 characters long, all of which must be digits. Screen numbers from 9000 are reserved for customer-specific screens.
In the Screen Painter enter a short Description and Activate the screen.
Once this is done you will be presented with a screen that will have three tabs, namely Attributes/Element List/Flow Logic
Click on Element List and type Ok_Code and Activate.
Now click on Flow Logic.
You should see the following code in the Flow Logic.
PROCESS BEFORE OUTPUT.
MODULE STATUS_9000.
PROCESS AFTER INPUT.
MODULE USER_COMMAND_9000.
Create MODULE STATUS_9000 by double clicking on it. The following code will be automatically created.
-
INCLUDE ZSALESORDERTOP . "
INCLUDE ZSALESORDERO01 . *
INCLUDE ZSALESORDERI01 . *
INCLUDE ZSALESORDERF01 . *
&----
*& Module STATUS_9000 OUTPUT
&----
text
----
MODULE STATUS_9000 OUTPUT.
SET PF-STATUS 'xxxxxxxx'.
SET TITLEBAR 'xxx'.
ENDMODULE. " STATUS_9000 OUTPUT
-
Uncomment the following code.
SET PF-STATUS 'ZSALES'. -
Menu Bar for the custom Sales Order Screen.
SET TITLEBAR 'ZSL'. -
Title.
-
Give appropriate names to PF-STATUS and TITLE BAR. Once the code is uncommented and the appropriate names are given. Double click on the name ZSALES. Once you see the prompt click on create object.
You will see the following three options in the resulting screen.
Menu bar Status for Sales Order Screen
Application toolbar Status for Sales Order Screen
Function keys Status for Sales Order Screen
-
Click on the Function Keys Drop Down Box. You will see the Standard Tool Bar with Icons that you normally see in the SAP Screen.
Enter the following values in the empty fields.
Standard Toolbar
Ente SAVE BACK EXIT CANCEL PRINT FIND FINDNEXT FIRSTPAGE PREVP NEXT LAST
Activate the PF-STATUS.
You will be prompted to enter the Function Text and Info Text for the button Enter.
Please enter the following values.
Function Text 'Ente'
Info Text 'Enter'
Execute Transaction SE80 and Activate the complete program by right clicking on it.
We will now create a transaction code for our program. To create a transaction code right click on the main program and from the pop-up menu select Create-----Transaction.
In the dialog box enter the following values.
Transaction Code 'ZSALESORD'
Short Description 'Create Sales Order'
-
And Click on Save.
You will now be asked to enter Program name and Screen Number. Enter the following values.
Program ZSALESORDSCREEN
Screen 9000
-
Save and Activate the Program
Now we need to enter code to create the Sales order. We also need to create the Screen Elements.
In transaction SE80 in the left pane click on Screens and then double click on 9000.
Now from the menu click on LAYOUT button.
We need to create Labels and Text Boxes for the following fields.
Filed (Label Display) Label Name TextBox Name Def Length
Order Type lblordtyp txtordtyp 2
Sales Org lblsalesorg txtsalesorg 4
Distribution Channel lbldistchnl txtdistchnl 2
Division lbldiv txtdiv 2
Sold-to Party lblsoldto txtsoldto 10
Ship-to Party lblshipto txtshipto 10
Purchase Ord lblpurchord txtpurchord 10
Material lblmat txtmat 18
Quantity lblqty txtqty 13
We also need to create a command button as follows
Label Name
Create Order lblcreateord
-
We will now look at the property box which is displayed after double clicking on each screen element.
Order Type (Label)
Name lblordtyp
Text Order_Type
Order Type (Text Box)
Name txtordtyp
Text
Def. Length 2
Similarly fill the Property box for other fileds
Important
Property Box for Command Button in this case the Function Code is important
Create Order
Name cmdord
Text Create Order
Fct Code ORDE
2008 May 22 6:36 AM
Sir that i know ,
I will use call transection "ZABC" .
Then it will open the selection screen , but i have to avoid selection screen , My concern is hou to get the output for a perticular input .
How to do this sir ???
Regards : rajneesh
2008 May 22 6:39 AM
Use this:
LEAVE TO LIST-PROCESSING AND RETURN TO SCREEN 0.
Write : C.
Regards,
Raghu
2008 May 22 6:40 AM
Hi,
use this.
SUPPRESS DIALOG.
LEAVE TO LIST-PROCESSING AND RETURN TO SCREEN 0
and to Create Push Buttons in Application Tool Bar ,
REPORT zJ_test
MESSAGE-ID zprecot.
TABLES : afru.
TYPES : BEGIN OF ty_test,
ism01 LIKE afru-ism01,
END OF ty_test.
TABLES sscrfields.
SELECTION-SCREEN : BEGIN OF BLOCK b1 WITH FRAME TITLE text-001.
SELECT-OPTIONS : so_werks FOR afru-werks.
SELECTION-SCREEN PUSHBUTTON /79(10) charly USER-COMMAND abcd.
SELECTION-SCREEN END OF BLOCK b1.
INITIALIZATION.
MOVE 'Press' TO charly.
START-OF-SELECTION.
END-OF-SELECTION.
AT SELECTION-SCREEN.
IF sscrfields-ucomm = 'ABCD'.
MESSAGE i000 WITH so_werks-low 'Success' .
ENDIF.
Regards,
Jagadish
2008 May 22 6:40 AM
Hi,
for call transaction there is an addition
CALL TRANSACTION tcod AND SKIP FIRST SCREEN
Effect
Skips the first screen in the transaction (provided all the required fields have been assigned values by the SPA/GPA mechanism).
hope this helps,
reward if helpfull,
taher
2008 May 22 6:56 AM
Boss ur suggestion is very near to my solution .
May Please suggest me how to provided all the required fields have been assigned values by the SPA/GPA mechanism .
My selection Screen carring only two fields say A and B
For Ex : program's Selection Screen has two input parameters
A = 5
B = 4
output of the report : C = 9 . (5 + 4)
Requirement is when user click Puch Button , it will get out put C = 10 .
My sole Issue is how provide input to selection screen which i am skiping by using SPA/GPA mechanism . ???
Please help me Boss .
Regards : Rajneesh .
2008 May 22 6:35 AM
Hi,
Use the following keyword:
LEAVE TO LIST-PROCESSING AND RETURN TO SCREEN 0.
Regards,
Raghu
2008 May 22 6:36 AM
Hi,
You can create the following on selection screen:
Example :
TABLES SSCRFIELDS.
...
SELECTION-SCREEN PUSHBUTTON /10(20) CHARLY USER-COMMAND ABCD.
...
INITIALIZATION.
MOVE 'My text' TO CHARLY.
...
AT SELECTION-SCREEN.
IF SSCRFIELDS-UCOMM = 'ABCD'.
...
ENDIF.
A pushbutton appears on the selection screen with the text 'My text'. In the AT SELECTION-SCREEN event, the field SSCRFIELDS-UCOMM has the contents ABCD after the button has been pushed.
For more info refer SAP help(F1):
Reward if useful
Regards,
Raj.
| User | Count |
|---|---|
| 3 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |