How to check when data is changed in ALV specific field? [duplicate] - abap

This question already has answers here:
Read ALV changes after user input?
(2 answers)
Closed 2 years ago.
I need to check a field in my ALV, set as editable, when it is changed.
This is my fieldcat with the concerned field set as editable:
CLEAR wfieldcat.
wfieldcat-fieldname = 'PERDEVA'.
wfieldcat-ref_fieldname = 'PERDEVA'.
wfieldcat-ref_tabname = 'IT_DEVALUATS'.
wfieldcat-seltext_s = 'Devaluat'.
wfieldcat-seltext_m = 'Devaluat'.
wfieldcat-seltext_l = 'Devaluat'.
wfieldcat-ddictxt = 'M'.
wfieldcat-edit = 'X'. "<==========
APPEND wfieldcat TO p_fieldcat.
Once the field is changed by user, I need to check some conditions for value, and if they are not accomplished, just call my own refresh form.
Probably there are some Function Modules or Methods to do that, but every documentation that I found refers to S/4HANA and I'm using R/3.
Edit:
As I said in comments "CHECK_CHANGED_DATA" is the Function Module that i was looking for, and #Suncatcher provides the threat with a properly usage example.

You should see the demo programs, Go to SE38 tcode and you can write BALV* or BCALV* press f4. You can see check_changed_data implement examples.

Related

Using datepicker in DotNetNuke-7 module

I'm a DNN beginner. I am currently building a module in which I can display statistics. My DotNetNuke Version is 7.0. The statistic is from Chartjs. For this statistic I would like to implement filters. These filters should be datepickers. As UI element I have now included a textbox with TextMode='Date'. But currently I have problems to set the default value of this field. The default value should be 01.01. of the current year.
I have already tried to set the value via C# server side. Unfortunately without success. I also tried to set the value on the client side via JavaScript. Unfortunately also without success.
These are some lines I tried in JavaScript:
document.getElementById(<%= this.DatumVon.AccessKey %>).value = "01.01.2019";
document.getElementById(<%= this.DatumVon.AccessKey %>).innerText = "01.01.2019";
document.getElementById("DatumVon").value = "01.01.2019";
These are some lines I tried in C# in the method "Page_Load" (server side):
this.DatumVon.Text = "01.01.2019";
I expected the value of the TextBox to be 01.01.2019. However, it currently only contains dd.mmm.yyyy. How can I change this?
Thank you.
There is something wrong with your localization. Please refer to the jQuery UI datepicker documentation (the "Localization" section), this should give you the answer.
wow... I solved it. I made it. Sometimes the solution is right in front of you and you don't see it. Michael Tobisch was absolutely right. When setting the value, the format is very important. I have always used the German format. A DNN TextBox with TextMode="Date" can't handle that. DNN converts this TextBox into an HTML input field. But this input field can only be clear with the format "yyyy-mm-dd". Depending on the geographical position of the client (at least that's what I think) the text displayed in the input field will be formatted. But the value of the input field always has the same format ("yyyy-mm-dd"). So very important here: the displayed text and the actual value have different formats.
Many thanks again to Michael Tobisch for the mental inspiration and the patience with me.
What is also important is that the access to the actual ID of a DNN element works as follows: this.Element.ClientID and not as I assumed before this.Element.AccessKey. This was also buggy.

Get LimeSurvey not selected multiple choice answers with "N" using API Remote Control

Is it possible to get not selected answers in multiple choice question type marked with "N" when consuming Lime Survey API?
The API method export_responses gives all the question/subquestions/answers codes of user responses in bulk.
But the multiple choice question type signalizes only the selected answers with an "Y". I'd like responses bring the answers not selected with an "N" written. LimeSurvey can do that?
Example:
listTpFisioAt is the question code; text, in listTpFisioAt[text], is an option. When I consume the API to get responses I get something like this:
lisTpFisioAt[Fototerapia]
lisTpFisioAt[Termoterapia]
lisTpFisioAt[Cinesioterapia] Y
lisTpFisioAt[Eletroterapia]
lisTpFisioAt[Hidroterapia] Y
In this case user selected Cinesioterapia and Hidroterapia in Lime Survey interface.
I'd like to get:
lisTpFisioAt[Fototerapia] N
lisTpFisioAt[Termoterapia] N
lisTpFisioAt[Cinesioterapia] Y
lisTpFisioAt[Eletroterapia] N
lisTpFisioAt[Hidroterapia] Y
No, is not possible. Limesurvey fills checked options only. The other ones are left empty. You will need to fill the empty ones yourself by processing the output.
Hope it helps.
Thanks

yadcf externally triggered filters 'shut off' the actual filtering

I am trying to set my yadcf filters up so they can be triggered from a call (link) from another page. I have an angular single page application that has three tabs on it. If a user clicks a link on lets say the first tab, they will go to another tab (separate table) that contains detailed information relevant to the link they click. (e.g. They are on a row in a table that deals with Apple Mac Pro computers. They see that there are 20 skus currently in the system. They click the number 20 and they go to a lower tab (different table) that contains all the information for those skus). There is no server call in the middle. All the data is loaded in all the tables when the application loads up. So, they are simply clicking a link that applies a filter to the detail table.
yadcf can do this through externally_triggered filters. However, when I set 'externally_triggered': true, it stops the actual filters from working on the details table. (In other words, I can no longer go to that table and manually adjust the filters.)
Does anyone know a way around this issue?
It appears the externally_triggered: true switch does not need to be turned on to use yadcf.exFilterColumn() method. I do not understand when it does need to be turned on, but I am able to call the exFilterColumn method and pass it the options needed to 'prefilter' the table while still retaining the ability to filter the table manually.
externally_triggered and yadcf.exFilterColumn are not related in any way, indeed when yadcf.exFilterColumn is used filters behave a bit differently - they are not filtering on change/keyup/etc , but rather only when the uadcf.exFilterExternallyTriggered function is called (its on purpose and all is explained in the docs)
Here is the relevant text from the docs of the externally_triggered, here it is:
* externally_triggered
Required: false
Type: boolean
Default value: false
Description: Filters will filter only when yadcf.exFilterExternallyTriggered(table_arg) is called
Special notes: Useful when you want to build some form with filters and you want to trigger the filter when that form
"submit" button is clicked (instead of filtering per filter input change)
Here is the showcase page

RSA Archer user cannot specify a date in the future / past

Has anyone any good patterns for RSA Archer validation which prevents a user from saving the record when a given date specified is in the future (or past)?
Currently I am catching this using calculated fields after the data has been saved, in a data exceptions report. But ideally I would like to catch this early prior to the user saving the record.
I would suggest that you use custom object in this case.
So remove the basic onclick attribute of the SAVE and APPLY button.
In your custom object, check if the entered date matches the system date (or the time-zone you need). Set a flag. Based on the flag value, you can call the actual function call of the SAVE or APPLY button.
Hope that helps!
Alex,Tanveer is correct. You have to use a Custom Object with embedded JavaScript code to implement described functionality.
You will need to create a function that will validate the value entered by the end user and either accept it or make user correct himself.
Now, you have two options how to do it:
1. You can attach your validation function to the Save and Apply buttons as Tanveer described. I have shared a similar code in the following question before. You can review it here: LINK
2. You can attach your validation function to the element you plan to validate directly. So when user is done with given input element and input element loses focus your function will be called. Here is a sample code with jQuery:
$('#elementid').blur(function() {
// validate entered value here
// if required show a pop-up message
WarningAlert(msg, title);
});
Good luck!

Possible values for msrp_display_actual_price_type in Magento API

What are the possible values for msrp_display_actual_price_type in the Magento API. It takes an Int, but I haven't been able to find any documentation that tells what values are mapped to the UI, or how I might do a lookup to get those values.
A quick inspection of the admin panel and the field on a product edit screen, in the 'Prices' tab is 'Display Actual Price' and the values are:
1 = On Gesture
2 = In Cart
3 = Before Order Confirmation
4 = Use config
More information here: http://www.magentocommerce.com/api/rest/Resources/Products/products.html
I know this has been hanging around a while but I had the same questions, found this and then found the answer.
I encountered this error on CSV import which I resolved by replacing in the spreadsheet the msrp_display_actual_price_type value as follows:
Relaced: 4
with: Use config