Regarding push button for parameters
initially there are two push buttons and the parameters should not be displayed.
when any one push button is clicked on one parameter should be displayed.
i had written the following code but is not working
please help me
with regards
bob
TABLES : SSCRFIELDS.
PARAMETERS : P LIKE MARA-MATNR MODIF ID ABC.
PARAMETERS : P1 LIKE MARC-WERKS MODIF ID ABC.
SELECTION-SCREEN : begin of line,
PUSHBUTTON 2(10) PB1 USER-COMMAND A,
PUSHBUTTON 20(10) PB2 USER-COMMAND B,
end of line.
AT SELECTION-SCREEN ." OUTPUT.
CASE SSCRFIELDS-UCOMM.
WHEN 'A'.
LOOP AT SCREEN.
IF SCREEN-NAME = 'P'.
SCREEN-INPUT = '0'.
MODIFY SCREEN.
ENDIF.
ENDLOOP.
endcase.
Hi Gangadhar,
Try the following code. Its working on my side.
TABLES : SSCRFIELDS.
PARAMETERS : P LIKE MARA-MATNR MODIF ID ABC.
PARAMETERS : P1 LIKE MARC-WERKS MODIF ID ABC.
SELECTION-SCREEN : begin of line,
PUSHBUTTON 2(10) PB1 USER-COMMAND A,
PUSHBUTTON 20(10) PB2 USER-COMMAND B,
end of line.
DATA : FLAG TYPE C.
AT SELECTION-SCREEN OUTPUT.
IF FLAG IS INITIAL..
LOOP AT SCREEN.
IF SCREEN-NAME = 'P'.
SCREEN-ACTIVE = '1'.
SCREEN-INPUT = '0'.
SCREEN-OUTPUT = '1'.
SCREEN-INVISIBLE = '1'.
MODIFY SCREEN.
ENDIF.
ENDLOOP.
ENDIF.
AT SELECTION-SCREEN .
CASE SSCRFIELDS-UCOMM.
WHEN 'A'.
FLAG = '1'.
LOOP AT SCREEN.
IF SCREEN-NAME = 'P'.
SCREEN-ACTIVE = '1'.
SCREEN-INPUT = '1'.
SCREEN-OUTPUT = '1'.
SCREEN-INVISIBLE = '0'.
MODIFY SCREEN.
ENDIF.
ENDLOOP.
Endcase.
Hope this helps,
Pragya
Similar Messages
-
I want a push button for line items in my sales order entry screen.
Hi,
I want a push button for line items in my sales order entry screen.
How can I do so?
Thanks.Hi Kumar ,
To have a push buttons you need to first assign a pf-status .
here a sample code for a push button and its handling :
set pf-status 'SELECT' .
at user-command .
describe table t_lpr lines w_lines .
case sy-ucomm .
when 'SELECTALL' .
set pf-status 'SELECT' excluding 'SELECTALL' immediately.
do w_lines times .
read line w_line field value w_check . " INTO W_CHECK .
if w_check = space .
w_check = 'X' .
modify line w_line field value w_check. "INTO W_CHECK .
add 1 to w_line .
endif . " IF W_CHECK = ' '
enddo .
Thus when you say pf-status say 'select' , Double click on that and you find a screen eher you can select icons and assign a function code to it!
Hope it helps!
Much Regards,
Amuktha . -
Regarding : Push button collective Billing document
Hi Gurus,
In transaction VF04, there is a push button called collective billing document, the requirement is to hide or make the push botton inactive, is it possible through any developments or any std configuration available to disable that, or any other methods pls help me at the earliest.
Thanks in advance
Regards
RajeshHi,
VF04 t.code
menu System----> Status
U found popup window in that u found Progam name RXXXXX like this .
Double click on this....
It will goes to SE38 editor copy this Program to zprogram
then find out Set PF status in that Program
Delete that button...
AND use Zprogram -
initially there are two push buttons and the parameters should not be displayed.
when any one push button is clicked on one parameter should be displayed.
TABLES : SSCRFIELDS.
PARAMETERS : P LIKE MARA-MATNR MODIF ID ABC.
PARAMETERS : P1 LIKE MARC-WERKS MODIF ID ABC.
SELECTION-SCREEN : begin of line,
PUSHBUTTON 2(10) PB1 USER-COMMAND A,
PUSHBUTTON 20(10) PB2 USER-COMMAND B,
end of line.
AT SELECTION-SCREEN ." OUTPUT.
CASE SSCRFIELDS-UCOMM.
WHEN 'A'.
LOOP AT SCREEN.
IF SCREEN-NAME = 'P'.
SCREEN-INPUT = '0'.
MODIFY SCREEN.
ENDIF.
ENDLOOP.
endcase.REPORT znrw_pbut .
SELECTION-SCREEN PUSHBUTTON 15(5) pbut_1 USER-COMMAND pb1.
SELECTION-SCREEN PUSHBUTTON 35(5) pbut_2 USER-COMMAND pb2.
parameters: pbut1a type matnr MODIF ID pb1,
pbut1b type sydatum MODIF ID pb1.
parameters: pbut2a type vbeln MODIF ID pb2.
TABLES: sscrfields.
data l_button like sy-ucomm.
INITIALIZATION.
MOVE 'PB 1' TO pbut_1.
MOVE 'PB 2' TO pbut_2.
l_button = 'PB1'
AT SELECTION-SCREEN.
IF sscrfields-ucomm = 'PB1'
OR sscrfields-ucomm = 'PB2'.
l_button = sscrfields-ucomm.
ENDIF.
AT SELECTION-SCREEN OUTPUT.
loop at screen.
IF SCREEN-GROUP1 = 'PB1'
OR SCREEN-GROUP1 = 'PB2'.
IF SCREEN-GROUP1 <> L_BUTTON.
SCREEN-ACTIVE = '0'.
MODIFY SCREEN.
ENDIF.
ENDIF. -
Get # from JTextfield, draw that # ovals, push button for color
all
i have an assignment that requires the user to enter a JTextField integer value.
that value is then used to draw an equal # of ovals.
after the ovals are drawn user selects a color button (red/blue) to fill the ovals already drawn based on the button color.
i have everything coded and working except the coloring.
i need help because i can't seem to figure out where or how to fill the ovals with the colors of the button pushed.
OvalDriver7b invokes OvalFrame7B invokes OvalPanel7B.
thanx
75gator
* OvalDriver7B.java
* Created on April 26, 2004, 1:50 PM
* @author dbraxton
// declare OvalDriver7b class
public class OvalDriver7B {
public static void main (String [ ] args) {
OvalFrame7B oframe = new OvalFrame7B();
oframe.setTitle("Request ovals by text ");
oframe.show();
}// terminate main
}// terminate OvalDriver7B
* OvalFrame7B.java
* Created on April 26, 2004, 2:35 PM
// @author dbraxton
// import JAVA API classes
import java.awt.*;
import java.awt.event.*;
import javax.swing.*;
// class declaration
public class OvalFrame7B extends JFrame {
private JTextField numOvals;
private JLabel labelField;
private JButton rButton, bButton;
private JPanel textPanel, buttonPanel;
private OvalPanel7B opanel;
final int WIDTH = 300;
final int HEIGHT = 300;
public OvalFrame7B() {
setSize(800,565);
this.addWindowListener(new WindowCloser());
opanel = new OvalPanel7B();
labelField = new JLabel("Enter integer for # ovals: ");
numOvals = new JTextField(2);
rButton = new JButton("RED");
bButton = new JButton("BLUE");
numOvals.addActionListener(new TextFieldListener());
Color rColor = new Color(255,0,0);
Color bColor = new Color(0,0,255);
buttonPanel = new JPanel();
buttonPanel.setLayout(new GridLayout (1,2));
buttonPanel.add(rButton);
buttonPanel.add(bButton);
//JButton colorButton = new JButton("Change circle color?");
//colorButton.addActionListener(new ColorListener());
rButton.addActionListener(new ActionListener() {
public void actionPerformed(ActionEvent event) {
//color ovals red ????????
opanel.repaint();
bButton.addActionListener(new ActionListener() {
public void actionPerformed(ActionEvent event) {
//color ovals blue ????????
opanel.repaint();
textPanel = new JPanel();
textPanel.setLayout(new GridLayout (1,2));
textPanel.add(labelField);
textPanel.add(numOvals);
Container contentPane = getContentPane();
contentPane.setLayout(new BorderLayout());
contentPane.add(opanel, "Center");
contentPane.add(textPanel, "South");
contentPane.add(buttonPanel, "North");
private class TextFieldListener implements ActionListener {
public void actionPerformed(ActionEvent event) {
String input = numOvals.getText();
opanel.setOvalCount(Integer.parseInt(input));
numOvals.setText("");
private class WindowCloser extends WindowAdapter {
public void WindowClosing (WindowEvent wex) {
System.exit(0);
* OvalPanel7B.java
* Created on April 26, 2004, 2:35 PM
* @author dbraxton
// import JAVA API classes
import javax.swing.*;
import java.awt.*;
import java.awt.geom.*;
import java.util.Random;
// begin class declaration
class OvalPanel7B extends JPanel {
private int ovalcount;
private static final double O_WIDTH = 50;
private static final double O_HEIGHT = 100;
double w1 = 100, h1 = 100;
OvalPanel7B() {
public void paintComponent(Graphics g) {
super.paintComponent(g);
Graphics2D g2 = (Graphics2D) g;
Random rnd = new Random();
g2.setBackground(Color.WHITE);
for ( int i=0; i < ovalcount; i++) {
double x = rnd.nextDouble() + w1;
double y = rnd.nextDouble() + h1;
w1 = w1 + 50;
h1 = h1 + 0;
Ellipse2D.Double oval = new Ellipse2D.Double(x,y,O_WIDTH,O_HEIGHT);
g2.setColor(Color.BLACK);
if ( i % 2 > 0) {
g2.draw(oval);
else
x = rnd.nextDouble() + w1;
y = rnd.nextDouble() + h1;
g2.draw(oval);
}w1 = 100; h1 = 100;
public void setOvalCount (int cntx) {
ovalcount = cntx;
repaint();
}Hi,
This forum is for asking questions about using Sun Java Studio so the kind of people who might know the answer might not be reading these posts.
I am thinking that a better place to get answers for this question is https://java-net.dev.java.net/servlets/ForumMessageList?forumID=95 -
Regarding Push Buttons in Output Screen
Hi All,
I want to add to buttons in the output screen(not in the selection-screen). I used the below code, but it was showing those buttons in selection screen. can any one help me how to get these two buttons in the output screen.
INITIALIZATION.
sscrfields-functxt_01 = 'AUTO POPULATE'.
sscrfields-functxt_02 = 'SAVE'.
AT SELECTION-SCREEN.
CASE sscrfields-ucomm.
WHEN 'FC01'.
WHEN 'FC02'.
ENDCASE.
Thanks in advance.
Regards,
Ramana Prasad. Thi
good
go through this code,which ll give you brief idea about create the button in output screen
*& Report ZSSCRBUTTON *
*& Adds buttons to selection screen. *
*& Demonstrates alteration of selection screen layout depending on *
*& which button is pressed. *
REPORT zsscrbutton NO STANDARD PAGE HEADING.
TABLES: t030, skat, sscrfields.
SELECTION-SCREEN BEGIN OF BLOCK block1 WITH FRAME
TITLE text-001.
SELECT-OPTIONS: p_ktopl FOR t030-ktopl,
p_komok FOR t030-komok,
p_ktosl FOR t030-ktosl.
SELECTION-SCREEN SKIP.
*SELECTION-SCREEN FUNCTION KEY 1. Adds button to application toolbar
Declaration of sel screen buttons
SELECTION-SCREEN BEGIN OF LINE.
SELECTION-SCREEN PUSHBUTTON (20) w_button USER-COMMAND BUT1.
SELECTION-SCREEN PUSHBUTTON (25) w_but2 USER-COMMAND BUT2.
SELECTION-SCREEN END OF LINE.
SELECT-OPTIONS: p_konts FOR t030-konts,
p_bklas FOR t030-bklas.
PARAMETER: gd_ucomm like sy-ucomm default BUT1′ no-display.
SELECTION-SCREEN END OF BLOCK block1.
TYPES: BEGIN OF t_t030,
ktopl TYPE t030-ktopl,
konts TYPE t030-konts,
txt20 TYPE skat-txt20,
bklas TYPE t030-bklas,
bkbez TYPE t025t-bkbez,
END OF t_t030.
DATA: it_t030 TYPE STANDARD TABLE OF t_t030 INITIAL SIZE 0,
wa_t030 TYPE t_t030.
DATA: gd_repsize TYPE i VALUE 83′.
*INITIALIZATION.
INITIALIZATION.
Add displayed text string to buttons
w_button = GL account selection.
w_but2 = Valuation class selection.
*AT SELECTION-SCREEN.
AT SELECTION-SCREEN.
Check if buttons have been
if sscrfields-ucomm eq BUT1′.
gd_ucomm = BUT1′.
clear: p_BKLAS.
refresh: p_BKLAS.
elseif sscrfields-ucomm eq BUT2′.
clear: p_KONTS.
refresh: p_KONTS.
gd_ucomm = BUT2′.
endif.
*AT SELECTION-SCREEN OUTPUT.
AT SELECTION-SCREEN OUTPUT.
if gd_ucomm eq BUT1′.
loop at screen.
if screen-name CS P_KONTS.
screen-active = 1.
elseif screen-name CS P_BKLAS.
screen-active = 0.
endif.
modify screen.
endloop.
elseif gd_ucomm eq BUT2′.
loop at screen.
if screen-name CS P_KONTS.
screen-active = 0.
elseif screen-name CS P_BKLAS.
screen-active = 1.
endif.
modify screen.
endloop.
endif.
thanks
mrutyun^ -
Regarding using ranges for parameters
Hi all,
I have a requirement where i have to get the below using ranges.
Can anyone help me what shuld be done.
For existing program Z_AVAILABILITY, create parameter selection to run by travel dates. Must have ability to run nightly (travel date range: tomorrows date to 60 days later) and weekly (travel date range: 61days after of tomorrow to 6 month after of todays date).
eventual i have to use this in select statement.
Frnds plzz help me its urgent.
regards,
satishHi,,
first declare ranges like this
ranges:
r_tdlnr for lfa1-lifnr, " Forwarding agent number
r_scacd for lfa1-scacd. " Standard carrier access code.
after that assisgn values into it like this
move: 'I' to r_tdlnr-sign,
'EQ' to r_tdlnr-option,
t_lfa1-lifnr to r_tdlnr-low.
and finally write select statement like this..
select vttk~tknum " Shipment number
vttk~tpbez " Transport description
vttk~tdlnr " Forwarding agent number
vttp~tpnum " Shipment line item
vttp~vbeln " Delivery number
vttp~zseq_num " Delivery stage sequence number
into table t_vttk_vttp
from vttk inner join vttp
on vttptknum eq vttktknum
for all entries in t_lips_vbak " for all deliveries
where vttk~tdlnr in r_tdlnr " with valid forwarding agents
plzz reward if it is usefull to u... -
Iview: Push button for switching on or off the description of the document
Hi all,
In the AdminExplorer iview, I want to have a button to display the description of the document, as it happends in the following page.
https://www.sdn.sap.com/irj/sdn/downloads
I've added the follwoing rnd:command(command=NEWCOMMAD/style=icon)
in List Renderer's Dispayed properties field, BUT
a)I dont know how to create that NEWCOMMAND,
b)I dont know if this the correct way of doing it.Quick answer—No.
-
question: Is my IPhone 4S now defective/defunct for use with a bad push button for on/off and screensaver, or is there a mechanical fix that an Apple Store Genius can do to pop that button out again?
Oh, yes, the Apple store will either install that cheesy, annoying screen app, or tell me I can replace my phone - only 1 1/2 years old - come on, Apple! - for a hefty price since the warranty is over and my cell contract still has months to go. Oh, and I've purchased AppleCare several times on other products and never needed it because I am careful with my electronics! Apple has gotten enough money from me for AppleCare in the past, and why would I have expected Apple to have a shoddy product (well, I might now). Thanks for responding, though.
-
How to inactive the push button on tool bar of alv report
hi masters,
i m working on the ALV interactive report, in this report i have to do 2 different operation on 2 screen.
eg.- on first screen i have the push button for 'data' and on second screen i will have the push button for 'upload'.
in this i don't want to give the 'upload' button on first screen and same i don't want to give the 'data' button on 2nd screen.
i tried with using the 2 different gui status and 2 different PF-STATUS but its not working.
anyone can tell me how i can deactivate the 'upload' button on first screen and how i can do same for 'get' buttton on 2nd screen.
regards,
vickyHI Vicky ,
if u want an interactive ALV report , there are lot of forums already having the solution for that , but let me give u the solution anyway.
In the function module "REUSE_ALV_GRID_DISPLAY" , import parameters
I_CALLBACK_PF_STATUS_SET = 'FLIGHT'
I_CALLBACK_USER_COMMAND = 'BUTTON_CLICK'
has to be supplied to this function module . The PF status is where u hav created the two buttons , that PF status has to be given here .If the user clicks on the button then it is handled by the form routines . Inside the sub-routine based on the button the user has selected u could perform the action.
FORM FLIGHT USING RT_EXTAB TYPE SLIS_T_EXTAB.
SET PF-STATUS 'FLIGHT' EXCLUDING RT_EXTAB.
ENDFORM.
Here the "Flight" is the PF_status .
FORM BUTTON_CLICK USING UCOMM type SY-UCOMM
SELFIELD type SLIS_SELFIELD.
CASE UCOMM.
WHEN 'BUTTON!' .
write ur code for button 1.
WHEN "BUTTON"
*Write ur code for button2 .
end case.
endform.
for any queries reply back.
regards -
Down Payment clearing push button in MIR7
Dear Gurus,
Hi.....
I have created a PO for goods and for freight there is a separate vendor. For this PO i have created Down payment request for goods and down payment request separately for freight vendor also. Now, i have posted the down payments and i have done MIGO.
When i am doing MIR7, down payment clearing push button is appearing for goods vendor but where as it is not appearing for freight vendor..
Can u please suggest how to achieve this down payment clearing push button for the freight vendor?
Best Regards
Paresh Kumar GThere is no such provision in down payment where you can specifically pay to Freight vendor. You normally create down payment on the Down payment % that is allowed and entered in PO header under Payment Processig tab. The down payment will only consider the Basic price. It will not include Taxes and delivery costs conditions.
Due to the same reason, Down payment clearing option will not appear if you perform Invoice verification for Planned Delivery costs conditions in MIRO. But if you collectively perform Invoice verification for Goods and Planned delivery costs then you will get the said option in MIRO. -
Hi Gurus,
I have a column of push buttons in my table control, each push button for each line item.
According to my requirement, I disabled the push button column initially, it will only get enable depending
upon each line item's condition.
Like, 1st row, if rad2 = 'x' , then the push button for that line should get enabled.
2nd row, if rad2 = 'X', then the push button for that line should get enabled.
3rd row, if rad2 NE 'X', then the push button for that line should be disabled.
I tried a lot , but its not happening. May be because I disabled the column based on the screen group.
Can anyone please help me on this ?
Thanks
ChandanHi,
First assign some function keys for Radio buttons..
and assign the Logic for enabling and disabling screen logic in the PBO..
Refer:
Take the group1 for the screen fields that you have taken on screen as ABC and then follow code to disable fields, in PBO:-
IF <condition>. "as per your condition
IF screen-group1 = 'ABC'.
LOOP AT SCREEN.
screen-invisible = 0. "to disable screen fields
ENDLOOP.
MODIFY SCREEN.
ENDIF.
ENDIF.
Now say if you want to enable fields on some condition then you may use:-
IF <condition>. "as per your condition
IF screen-group1 = 'ABC'.
LOOP AT SCREEN.
screen-invisible = 1. "to enable Push Button
ENDLOOP.
MODIFY SCREEN.
ENDIF.
ENDIF.
Regards,
Prabhudas
Edited by: Prabhu Das on May 11, 2009 7:51 PM -
Hi
How can i achieve this...any help would be greatly appreciated
I had a Query With Cal Month/Year in rows and Revenue in Columns and Region as Free Chars
Query is restricted to display last 12 Months using offset variables and Region is restricted to fixed list of 10 regions
My Requirement is to develop a VC Dashboard/Model with
11 (10+1) push buttons for 10 Individual Regions + 1 for all 10 regions and a graph
So
The initial view of graph will display Revenue by Cal Month/Year for ALL regions and user can select a region using a push button which will filter the results in graph for that particular region
and if he selects ALL that is display data for all regions
Created a Model
Form with 11 Pushbuttons ...now i am struggling on how to apply values to be filtered to Query
Please help would be greatly appreciated
Thanks in advanceHi
Checked with Business with regards to Dropdown for buttons,But they prefer Buttons only
Can you please elobrate
"Pls try to create a button with custom action maybe Region1 and drag out from your chart
to your input port . Meanwhile store all your inputs in a data store and on this new action
resubmit those values along with your region value ie region1. I have not tried this out,
pls check and let me know if it works ."
Thanks -
Push button not visible in Quality
Hi,
We have created one push button for the tcode fbl1n and fbl5n using the standard BADi "FI_ITEMS_MENUE01".
Now, the problem is the button is visible in Development server but not in Quality server.
We have checked the version management but the code is very much visible in Quality.
But, the push button is not visible in the Quality.
Could anyone please provide with a solution to this problem.
Thanks in advance,
Kalyani.Hi,
We have transported the Class name as well as BADi name to Quality.
The implemented code along with the Fcode is visible in Quality.
But while executing the tcodes FBL1N and FBL5N the push button which was implemented, is not visible in Quality.
Thanks,
Kalyani -
Prob with Push Buttons in the selection screen
Hi All,
1) I have 6 push buttons in the selection screen(Normal Report), 3 in a first row(P11, P12, P13) and 3 in the second row(P21, P22, P23). If I press one push button(for ex P11) the other two Push buttons(P12 P13) should grey out(Inactive mode). If I press P22, P21 & P23 shoul grey out.
2) I need color change for the Inactive push buttons.
Thanks
KrisCan you please post your selection screen definition? I don't understand what you want to achieve by greying out the other pushbuttons when one is pressed.
Does that mean pushing one button will do nothing except greying out the buttons?
Typically when you push a button, you want to continue to execute the required processing for that button not just grey out other pushbuttons and stay in the selection screen.
Anyway, you can achieve that using the following logic. I am not sure how and if you can achieve the color change.
TABLES: sscrfields.
DATA: v_button_pushed(5).
SELECTION-SCREEN PUSHBUTTON /1(10) p11 USER-COMMAND push1.
SELECTION-SCREEN PUSHBUTTON 12(10) p12 USER-COMMAND push2.
SELECTION-SCREEN PUSHBUTTON 23(10) p13 USER-COMMAND push3.
SELECTION-SCREEN PUSHBUTTON /1(10) p21 USER-COMMAND push4.
SELECTION-SCREEN PUSHBUTTON 12(10) p22 USER-COMMAND push5.
SELECTION-SCREEN PUSHBUTTON 23(10) p23 USER-COMMAND push6.
INITIALIZATION.
p11 = 'Push11'.
p12 = 'Push12'.
p13 = 'Push13'.
p21 = 'Push21'.
p22 = 'Push22'.
p23 = 'Push23'.
AT SELECTION-SCREEN OUTPUT.
CASE v_button_pushed.
WHEN 'PUSH1'.
LOOP AT SCREEN.
CHECK screen-name <> 'P11'.
screen-input = 0.
MODIFY SCREEN.
ENDLOOP.
WHEN 'PUSH2'.
WHEN 'PUSH3'.
WHEN 'PUSH4'.
WHEN 'PUSH5'.
WHEN 'PUSH6'.
WHEN OTHERS.
ENDCASE.
AT SELECTION-SCREEN.
v_button_pushed = sscrfields-ucomm.
Maybe you are looking for
-
Controle de Item por Conta de Depósito
Pessoal, boa tarde. É possível optarmos pelo tratamento do controle de um item cadastrado conforme print abaixo? Onde teremos que controla-lo pelo estoque e em alguns documentos de marketing não deve ser feita alteração no estoque, pois o mesmo
-
How to make Flash to wait for user input
Hi, I found this PHP script, then I made some changes to make it FEED the Flash user interface with online user input. The main concept of this script is WAITING for user input, so it shows the messages and then go to next line and so on. The user in
-
Since updating to ios 6 itunes match does not seem to work.
I just get a cloud symbol with a progress bar that makes no progress. Alos itunes does no show audio books that I know are on the phone because the storage usage has not changed. Any advice?
-
I downloaded new Firefox but now can't open Firefox at all. It says it is not supported on my system. How can I get the earlier version which I deleted?
-
Hi Thanks for your help with my last question and now have a functioing printer. Have another one though, as am trying to print some photos but in the paper list when go to select the type cannot see photo paper, can see plenty of lengthy reference n