Screen Field Value Should be changed based on changes in ALV values
Hi All,
We had created a ALV with container, in this Alv we have a checkbox, which is editable.
Based on the selection on checkbox , we need to update a field "Total selected" on screen.
we are using Event to handle data changed in ALV, but some how it doesn't work.
we even tried to use 'DYNP_VALUES_UPDATE' Function module to Update the field.
Please find the code below.
LOOP AT gt_final INTO gw_final WHERE mark EQ 'X'.
gv_sel = gv_sel + 1.
ENDLOOP.
lw_dynpfields-fieldname = 'GV_SEL'.
lw_dynpfields-fieldvalue = gv_sel .
APPEND lw_dynpfields TO lt_dynpfields.
CALL FUNCTION 'DYNP_VALUES_UPDATE'
EXPORTING
dyname = 'Z_MAINPROG'
dynumb = '0300'
TABLES
dynpfields = lt_dynpfields
EXCEPTIONS
invalid_abapworkarea = 1
invalid_dynprofield = 2
invalid_dynproname = 3
invalid_dynpronummer = 4
invalid_request = 5
no_fielddescription = 6
undefind_error = 7
OTHERS = 8.
IF sy-subrc <> 0.
MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
ENDIF.
We get Sy-subrc as 0. No error and no update.
Thanks in advance.
Regards,
Ravi
Do you flush to synchronize the itab from frontend?
In Debugger, is the column updated via 'X' for the checkboxes?
please insert cl_gui_cfw=>flush. to sync in PAI before analyzing the table.
Regards,
Christian
Similar Messages
-
Look-up name value from XML file based on user entered number value
My form has an "Employee Number" numeric field and an "Employee Name" textfield. I want the user to enter their employee number and have JavaScript that will "look-up" that employee number in the XML data file and return the corresponding Employee Name into the employee name textfield. I need an example XML data file and form with the appropriate script.
Can anyone help me with this?Hi ,
Re-read your post, find that the col2 in List1 is people and group type column, SharePoint Lookup type column showing additional fileds option does not support people and group type column, so there should be no OOB method to achieve your
goal.
http://techtrainingnotes.blogspot.com/2012/01/sharepoint-not-all-column-types-can-be.html
I think you can try using InfoPath form to manipulate the correspond col2 value when lookup col1 from List1 then show in list view, or may use custom visual web part to achieve you goal.
http://sharepointsolutions.com/sharepoint-help/blog/2011/11/get-infopath-to-display-lookup-column-value-not-id/
Thanks
Daniel Yang
TechNet Community Support -
How AP Down Payment value should reflect in BP Master GL with Gross Value
Hi All,
Its URGENT, please help me with possilbe solution for,
Scenario:- Need to make an advance payment to the vendor and the same amount need to deduct from the vendor invoice, but it should reflect in the Vendors account as a gross value like as a total material cost.
eg:-
AP down payment invoice request for Rs.12000/-and out going payment for the same. While posting AP invoice for 14000/-and need to adjusted Rs.12000/- as advance from the invoice.Now the vendor GL account will show the balance against this invoice is Rs.2000/- as credit.But it should show the invoice value in BP master GL as gross ie. Rs.14000/-
Im Using SAP B1
For further Clarification please contact:- Andrews - 9880208304 or Rohan - 9902294962
Regards,
Andrews.T.AHI
MOVE THE SPL GL AMOUNT ie 12000 to normal gl then it iwll reflect in BP master gl also....
see the the down payment are recorded in other gl and the invoice are recorded in other gl..
using f.54 u have to move the spl gl to normal gl then the entry will be passed
by debiting the BP master
and crediting the advance gl
then u you can match and make the payment also..
and also check the config on the down payment how the account are mapped
regarads
A.K -
Module pool screen field should default without pressing enter
Hi
I have got a main module pool screen which has a tabstrip with four tabs.
There are 2 fields in the main screen when we select from F4 for the first field then the field 2 should default in case of a condition.
This happens only when i press enter. I want the second field to change as soon as the first field is selected.
How do I trigger the PAI as soon as the field 1 is selected.
eg: Field 1 : i/p
Field 2 : display
Field 3 : i/p
On F4 for field 1 say i select value 'A' then the valu for field 3 should default to value 'B'. Also field 2 should be displayed based on combination of field 1 and field 2. But now it does it only on pressing enter.
How do I solve this problem?Also if i select field 1 value A and dont press enter and go to the subscreen tab then it does not do any thing. It allows to go on the subscreen tab. But actually it should default the field 3 value. It does it only when I press enter.
Also the F4 is from dictionary that is the screen fields are from dictionary. I have not created any F4 for the fields.
Please help me solve this problem
Regards,
mozilaHi
You can achieve this using List Box only not by Input Field. Since Input field doesn't trigger automatic PAI/PBO
Go through the below thread
populate drop down menu based on entry in another field
or an alternative is--> In PBO use POPUP_GET_VALUES Fm to get the First input field based on that you can enter further values
unicode error
Cheerz
Ram -
Screen field value under POV event
Hi All,
I have one issue...please suggest me solution for this.
In module-pool program i have one screen(1000) which has one field(hrname_1000).
Under this event:
PROCESS ON VALUE-REQUEST.
FIELD hrname_1000 MODULE hrname_1000.
under this module hename_1000 i have used F4IF_INT_TABLE_VALUE_REQUEST to put a search help for field hrname_1000.
after that i am trying to retrive HR related stuff's based on the field on module-pool i.e i am using hrname_1000 in the where condition.
but problem is that im not getting value for hrname_1000 which im giving in the module-pool screen.
thats y my select query is not working.
Where as im getting values for the hrname_1000 under PBO & PAI.
It will look like below.
PROCESS ON VALUE-REQUEST.
FIELD hrname_1000 MODULE hrname_1000.
(under the above module)
SELECT DISTINCT ename plans FROM pa0001 INTO CORRESPONDING FIELDS OF TABLE itab WHERE stell = '50001026'.
LOOP AT itab INTO wa WHERE ename = hrname_1000.
ENDLOOP.
Please suggest
Thanks & regards
AnsumeshHi,
I guess you don't get back value from function F4IF_INT_TABLE_VALUE_REQUEST to your global data object hrname_1000, althought it is returned from search help back to screen field.
See this thread. I explained there [how values are returned from screen field to a variable|https://www.sdn.sap.com/irj/scn/profile?userid=3509696]
You may also try with FM DYNP_VALUES_READ for reading dynpro fields values in POV.
Regards
Marcin -
Getting screen field values during runtime
Hi everyone,
In debugger for dynamically getting the screen field values we will be using (SAPLMGMW)CALP-ENDPA this format to get the value of the field CALP-ENDPA.
But this will give only for fields.My question is that how to get the screen field labels values in debugger.
Take a look at following picture.Hi,
Try putting a watch point on the screen field name and see where it is changing.
If your need is before that it won't be possible to get it as it is a processed value.
Also if it is updating on screen but still you are not getting that means the value is not transported from the Screen to the program in that case use the FM DYNP_VALUES_READ to get the values the documentation has the usage else there are lot of blogs just search it.
Regards -
Question mark in screen fields
Hi,
I have created a screen with 5 fields as an enhancement for tcode Iw31. I have a requirement in which if first field is filled then rest of the fields be made mandatory which i have done by looping at screen-required = 1.
Test case : I enter a value in the first field , hit enter which would make the rest of the 4 fields mandatory.
now on the screen in tcode iw31 if i select and delete the contents of the first field then i need to make the rest of the 4 fields un mandatory i.e looping on screen-required = 0. when i make the rest of the fields un-mandatory .... the 4 screen fields have a '?' in the fields.
This is PAI as it doesnt go to PBO of the screen.
PROCESS AFTER INPUT.
FIELD : coci_aufk-zz_lcnumber.
MODULE initial_field. -
> If first field is initial then make rest of the fields unmandatory
CHAIN.
FIELD : coci_aufk-zz_lcnumber ,
coci_aufk-zz_lctakendate,
coci_aufk-zz_lctakentime,
coci_aufk-zz_lcretdate,
coci_aufk-zz_lcrettime .
MODULE check_field. -
> if first field is not initial then make the rest of the fields mandatory
ENDCHAIN. " CHAIN
I have tried clearing of the fields......moving spaces in the fields......
I dont have table control or step-loop in the screen .
Thank you.
Viquar IqbalHi,
The screen field attributes should be modified in the PBO section of the flow logic.
"This is PAI as it doesnt go to PBO of the screen." . Why is it not going to the PBO? Check the reason for this.
regards
Nitesh -
Hi,
I want to group the selection screen fields. where should i group.
I want to group using the modif Id
T Y P E S
TYPES:
BEGIN OF TYVBAK,
VBELN TYPE VBAK-VBELN,
AUART TYPE VBAK-AUART,
AUDAT TYPE VBAK-AUDAT,
KUNNR TYPE VBAK-KUNNR,
NETWR TYPE VBAK-NETWR,
END OF TYVBAK.
D A T A D E C L A R A T I O N S
DATA:
STVBAK TYPE TYVBAK,
ITVBAK TYPE TABLE OF TYVBAK.
S E L E C T I O N S C R E E N
SELECTION-SCREEN BEGIN OF BLOCK B1 WITH FRAME TITLE TEXT-001.
SELECT-OPTIONS:
SKUNNR FOR STVBAK-KUNNR.
SELECTION-SCREEN END OF BLOCK B1.
SELECTION-SCREEN BEGIN OF BLOCK B2 WITH FRAME TITLE TEXT-002.
SELECT-OPTIONS:
SVBELN FOR STVBAK-VBELN,
SAUDAT FOR STVBAK-AUDAT.
SELECTION-SCREEN END OF BLOCK B2.
I N I T I A L I Z A T I O N
*INITIALIZATION.
FILLING SELECT OPTIONS WITH DEFAULTS
SKUNNR-SIGN = 'I'.
SKUNNR-OPTION = 'BT'.
SKUNNR-LOW = '1'.
SKUNNR-HIGH = '4000000'.
APPEND SKUNNR.
T O P O F P A G E
TOP-OF-PAGE.
WRITE:/1'SALES DOC',12 'DOC TYPE',20 'SALES DATE',32 'NETWORTH',60 'CUSTOMER'.
*A T S E L E C T I O N S C R E E N O U T P U T .
AT SELECTION-SCREEN OUTPUT.
LOOP AT SCREEN.
IF SCREEN-NAME = 'SVBELN-LOW'.
SCREEN-INPUT = 0.
MODIFY SCREEN.
ENDIF.
IF SCREEN-NAME = 'SVBELN-HIGH'.
SCREEN-INPUT = 0.
MODIFY SCREEN.
ENDIF.
ENDLOOP.
where should i group SBVELN and SAUDATHi
Instead of SCREEN-NAME use SCREEN-GROUP1 and for your select options give MODIF ID.
As follows
SELECTION-OPTIONS: selcrt for dobj MODIF ID MOD1.
AT SELECTION-SCREEN OUTPUT.
LOOP AT SCREEN.
CHECK SCREEN-GROUP1 = 'MOD1.
SCREEN-REQUIRED = 1.
MODIFY SCREEN.
ENDLOOP.
This is COZ when you use select-options you get TWO fileds on the INPUT screen LOW and HIGH so you have to check for selcrit-low and selctri-high you can avoid all this my assigning a MODIF ID.
See this sample programs for this
SELECTION-SCREEN BEGIN OF BLOCK b1 WITH FRAME TITLE text-001.
PARAMETERS: pa_file TYPE rlgrap-filename MODIF ID abc,
pa_lifnr TYPE lfa1-lifnr MODIF ID abc,
pa_vkorg TYPE vbak-vkorg MODIF ID abc.
SELECTION-SCREEN END OF BLOCK b1.
SELECTION-SCREEN BEGIN OF BLOCK b2 WITH FRAME TITLE text-002.
PARAMETERS: pa_kunnr TYPE vbak-kunnr MODIF ID def.
SELECT-OPTIONS: s_lifnr FOR gs_lfa1-lifnr MODIF ID def,
s_date FOR gs_lfa1-erdat MODIF ID def,
s_augru FOR gs_vbak-augru MODIF ID def,
s_vbeln FOR gs_vbak-vbeln MODIF ID def.
SELECTION-SCREEN END OF BLOCK b2.
SELECTION-SCREEN BEGIN OF BLOCK b3 WITH FRAME TITLE text-003.
SELECTION-SCREEN BEGIN OF LINE.
PARAMETERS: pa_upd RADIOBUTTON GROUP g1 USER-COMMAND uc01 DEFAULT 'X'."#EC *
SELECTION-SCREEN COMMENT 3(60) text-004 FOR FIELD pa_upd.
SELECTION-SCREEN END OF LINE.
SELECTION-SCREEN BEGIN OF LINE.
PARAMETERS: pa_rep RADIOBUTTON GROUP g1 ."#EC *
SELECTION-SCREEN COMMENT 3(60) text-005 FOR FIELD pa_rep.
SELECTION-SCREEN END OF LINE.
SELECTION-SCREEN END OF BLOCK b3.
IF pa_rep EQ gc_x.
LOOP AT SCREEN.
IF screen-group1 = gc_abc.
screen-input = gc_zero_num.
ELSEIF screen-group1 = gc_def.
screen-active = gc_one_num.
ENDIF.
MODIFY SCREEN.
ENDLOOP.
ELSEIF pa_upd EQ gc_x.
*For Reprocessing
LOOP AT SCREEN.
IF screen-group1 = gc_def.
screen-input = gc_zero_num.
ELSEIF screen-group1 = gc_abc.
screen-active = gc_one_num.
ENDIF.
MODIFY SCREEN.
CLEAR pa_upd.
ENDLOOP.
ENDIF.
REPORT zrich_001.
PARAMETERS: p_rad1 RADIOBUTTON GROUP grp1 DEFAULT 'X'
user-command chk,
p_rad2 RADIOBUTTON GROUP grp1.
SELECT-OPTIONS: s_datum1 FOR sy-datum MODIF ID d1,
s_datum2 FOR sy-datum MODIF ID d2.
AT SELECTION-SCREEN OUTPUT.
LOOP AT SCREEN.
IF p_rad1 = 'X'
AND screen-group1 = 'D2'.
screen-active = '0'.
ENDIF.
IF p_rad2 = 'X'
AND screen-group1 = 'D1'.
screen-active = '0'.
ENDIF.
MODIFY SCREEN.
ENDLOOP -
How to make the selection screen field names to apper as in logon language
hai
the selection screen field names should appear
as that of logon language
and <u>before that once i logon with a language
it should pop up the (some)message in the logon language</u>.
For the selection screen filednames to appear as that
of the logon language whether i have to maintain the textelements for all screen fields in all possible languages or i have to write only in english and tell mentioning it to changeIn <b>SE38</b> --> Goto --> Translate.
Choose target language, and start making the translation -;)
Greetings,
Blag. -
The date should be divided based on the month
Hi Team,
I have two fields A and B.Iam fetching vbeln and erdat from VBAK.it is in the Format YYYY/MM/DD.
suppose i get the values from 2009/10/01 to 2009/11/18.
Now all the values from 2009/10/01 to 2009/10/31 should be in A.
The values from 2009/11/01 to 2009/11/18 should be in B.
The Exact month values should be displayed in A the remaining days values of the next month should be displayed in B.
Suppose i have the values from 2006/09/11 to 2006/10/31.Now A should contain the values from 2006/09/11 to 2006/09/30
and B contains from 2006/10/01 to 2006/10/31.
Can you please suggest how to write the logic.
Hope the requirement is clear.
Regards,
Pradeep P.loop at itab into wa.
check the wa-erdat+4(2) " month number..
if month in range of dates...
add value to A
else.
add value to B
endif.
endloop. -
A screen field needs to be created with the following specification:
Dollar value with up to 8 characters including 4 decimals Ex: $100.0001
I have created it as type CURR, length 8, decimals 4.
Now, when i enter value in the field as 50.00 and press save entries..it gets saved as 0.5000, whih iswrong. what shud i do to display correct values?ttry package decimals
-
DYNP_VALUES_UPDATE does not change the value of my screen fields
Hi,
I have a screen with a header area and a control with an ALV.
In my header area i have 2 fields shown as an icon. These icons should change
with an event triggered in the ALV (in handle_user_command)
In handle_user_command I check the values of a column in my ALV - I have 3 possible cases : a green led, a yellow led or a red led.
When i'm debugging the program, everything seems to be ok. In my table i see the new values of the icons, but when I see the screen afterwards the old values have not been replaced. (I also use an refresh of my ALV)
Any help is welcome!
THx,
HelgaHi,
declare the internal table like below:
DATA: i_fieldvalues TYPE dynpread OCCURS 0 WITH HEADER LINE.
AT SELECTION-SCREEN ON VALUE-REQUEST FOR field.
PERFORM Display_contion_types.
FORM Display_contion_types.
Search help for Condition Type
PERFORM Display_contion_types.
Update screen fields like below:
Update Screen Field.
CLEAR i_fieldvalues[].
MOVE: 'V_TEXT' TO i_fieldvalues-fieldname .
WRITE i_t685-vtext TO i_fieldvalues-fieldvalue .
APPEND i_fieldvalues.
CALL FUNCTION 'DYNP_VALUES_UPDATE'
EXPORTING
dyname = sy-cprog
dynumb = sy-dynnr
TABLES
dynpfields = i_fieldvalues.
endif
regards,
Raja -
Please Help, I want to change field value in a table, based on another field value in the same row (for each added row)
I am using this code :
<HTML>
<HEAD>
<SCRIPT>
function addRow(tableID) {
var table = document.getElementById(tableID);
var rowCount = table.rows.length;
var row = table.insertRow(rowCount);
var colCount = table.rows[0].cells.length;
for(var i=0; i<colCount; i++ ) {
var newcell = row.insertCell(i);
newcell.innerHTML = table.rows[1].cells[i].innerHTML;
switch(newcell.childNodes[0].type) {
case "text":
newcell.childNodes[0].value = "";
break;
case "checkbox":
newcell.childNodes[0].checked = false;
break;
case "select-one":
newcell.childNodes[0].selectedIndex = 0;
break;}}}
function deleteRow(tableID) {
try {var table = document.getElementById(tableID);
var rowCount = table.rows.length;
for(var i=0; i<rowCount; i++) {
var row = table.rows[i];
var chkbox = row.cells[0].childNodes[0];
if(null != chkbox && true == chkbox.checked) {
if(rowCount <= 2) {
alert("Cannot delete all the rows.");
break;}
table.deleteRow(i);
rowCount--;
i--;}}}catch(e) {alert(e);}}
</SCRIPT>
</HEAD>
<BODY>
<INPUT type="button" value="Add Row" onClick="addRow('dataTable')" />
<INPUT type="button" value="Delete Row" onClick="deleteRow('dataTable')" />
<TABLE id="dataTable" width="350px" border="1">
<TR>
<TD width="32"></TD>
<TD width="119" align="center"><strong>Activity</strong></TD>
<TD width="177" align="center"><strong>Cost</strong></TD>
</TR>
<TR>
<TD><INPUT type="checkbox" name="chk"/></TD>
<TD>
<select name="s1" id="s1">
<option value="1">1</option>
<option value="2">2</option>
<option value="3">3</option>
</select>
</TD>
<TD><input type="text" name="txt1" id="txt1"></TD>
</TR>
</TABLE>
</BODY>
</HTML>Hi,
Let me make sure u r working with table control.
First u have to create a event(VALIDATE) to do the validation.
Inside the event,
1. First get the current index where user has pointed the curson
2. Once u get the index read the internal table with index value.
3. Now u can compare the col1 and col2 values and populate the error message.
1. DATA : lo_elt TYPE REF TO if_wd_context_element,
l_index type i.
lo_elt = wdevent->get_context_element( name = 'CONTEXT_ELEMENT' ).
CALL METHOD LO_ELT->GET_INDEX( RECEIVING MY_INDEX = l_index.
above code should be written inside the event.
Thanks, -
How to change screen field value.
Hi Experts,
I like to change the screen field MSAUS(check box) of program SAPLIQS0 in one of the exit.But if I use
(SAPLIQS0)VIQMEL-MSAUS = 'X'. its showing compile error.Please tell me how can i change this field in this exit.
Regards,
Ajish.try something like this:
create field symbol
FIELD-SYMBOLS: <fs>.
Assign value of variable from calling prog to field symbol
ASSIGN ('(SAPLIQS0)VIQMEL-MSAUS' ) TO <fs>.
<fs> = 'X'.
Regards,
ravi -
Process on value request in Dialog screen based on value of screen field
Hello Gurus,
I have a check box on a dialog screen. If the checkbox is checked, based on that I want the other field on the same dialog screen to follow logic for F4 dropdown.
Now I know if I want to write this, I have to write this in Process on value-request. But how do I get the value of the check box checked or not on the same screen in Process on value-request.
If it had been a simple selection screen I would have defined the check box as
Parameter: v_checkbox as checkbox user-command uc1.
But how do I handle above situation in dialog screen case ?
Please help.
Regards,
Jainam.
Edited by: Jainam Shah on Sep 29, 2009 6:19 PMHi Shah,
You have the addition for MODULE statement as ON INPUT.
Eg : FIELD <screen field> MODULE <module> ON INPUT.
You can give the check box field name in the above statement.
If you want to find as soon as the check box is checked, you can find it here.
Or else, in the addition ON REQUEST
you can see for the check box field value whether it is checked or not.
Thanks,
Prasad
Maybe you are looking for
-
[Forms10g (9.0.4)] error 310 with %ROWTYPE
I have a package specification in which i declare a user defined type and a function: SUBTYPE services_record_type IS services%ROWTYPE; FUNCTION services(services_record IN OUT services_record_type) RETURN BOOLEAN; When i compile, i am getting this e
-
I need to make 400 small circles with different 3pt text in each. How do I add text to a circle please? Also will I be able to open the final result with Microsoft word to print at all? Thank you
-
I ordered by credit card on 12/10/14 two color cartridges. The transaction was processed on my credit card but I did not receive my order. How long does it take for delivery? How can I check the status of an order?
-
"Some of the required files are missing" in iTunes 10.3.1.
Hi there: Apple Software Update recently updated my version of iTunes to 10.3.1, but I can no longer open the program. I receive the error message "Cannot open iTunes. Some of the required files are missing." I've reinstalled iTunes twice, to no avai
-
back to my expirement: i try to take signal from serial mouse by the following class but i have a NullPointerException : import javax.comm.*; import java.io.*; import java.util.*; public class ComControl implements Runnable, SerialPortEventListene