I have the following requirement. I need to save some parameters in the table VBAP. I've created additional fields in an append structure for that. Now, when a sales document is being saved, the parameters have to be updated as well.
For this I've been using USEREXIT_SAVE_DOCUMENT in the program SAPMV45A. There I loop over the table XVBAP where I set the fields.
This works as expected for existing positions. When a new position is being added the fields won't be updated and are empty.
What am I missing here? Do I have to use a different user exit for new positions?
Thanks in advance.
you can use "USEREXIT_MOVE_FIELD_TO_VBAP" in MV45AFZZ
Related
I have a report that basically is being used to populate textboxes using an sql query for a given order number. This generates the invoice well but i am now trying to see if its possible to rerun the same report with another order number through the sql query but append the new report onto the first one to basically have two concatenated instances of the report for export as a pdf. I've looked and the only thing ive found is using something like:
Dim reportinstance As New Report_Invoice
but i'm lost on how to repopulate the new instance with different data and append it together, any help is appreciated!
You can use the WHERE part of the report's parameters to do this. Something like:
Docmd.OpenReport "rptInvoice",acViewPreview,,"InvoiceID IN(1,4)"
This will open the report rptInvoice limited to show those that have an InvoiceID of either 1 or 4. You may need to build up the WHERE statement using VBA, perhaps from choices selected in a list box.
I want to delete mappings in DB using DataService.
For this purpose
I run search query for all ids in first thread group.
Using this method I put my Ids into the property.
Now property has view like that b69243ee6e9efdf66114200dc93881ac,b69243ee6e9efdf66114200dc90f5ba4,b69243ee6e9efdf66114200dc90e2184
I want to all delete mapping using this Ids from property one by one.
For this purpose I need run BeanShell Pre-Processor and choose first id and put it into variable. Please, help me with this script.
I believe ForEach Controller is the solution. But in my experience, I use regular expression extractor to grab the values and put it in one variable then loop it using ForEach Controller. I think these step will help you:
Add Regular Expression Extractor to grab the ids.
Make sure you fill field "Match No" with negative number (i.e. -1). Put the extracted value into one variable (i.e. IdVar. Fill Reference Name with IdVar). This step will grab all matched ids and put it into IdVar variable.
Then Add ForEach Controller to process each ids from IdVar variable.
For the details, just download this sample and try to run it.
I hope this will help you. :-)
In my Qlik View document I want to change the Current Selections information to use the Label applied to the field rather than the table.field format.
For example
PartsTable.PartNo
Would be
Part Number
Unfortunately there's no way to do this in the Current Selections object. However, you may have some alternatives depending on your requirements.
First of all, if you're just happy with seeing the current selections as text (rather than having the functionality of the Current Selections object), you can create a Text object and use the expression:
=replace(GetCurrentSelections(), 'PartsTable.PartNo', 'Part Number')
This will then look something like the below:
The other alternative is to use the RENAME statement in the load script after all your table loads are complete. RENAME allows you to rename a single field or a collection of fields by using a mapping table. The syntax for a single field is shown below:
RENAME FIELD oldname to newname
If you should need to rename more than one field at a time, you can expand this to:
RENAME FIELD oldname1 to newname1, oldname2 to newname2,...
More detail on the syntax including using a mapping table can be found in the QlikView installed help file.
For your example, I put together a small demo:
QUALIFY *;
PartsTable:
LOAD * INLINE [
PartNo
100
200
300
];
UNQUALIFY *;
RENAME FIELD PartsTable.PartNo to [Part Number];
This then results in:
RENAME is similar to the alias (AS) statement, except that you can first load all of your data, and then do the rename at the end. This will then rename your field so that it appears under its new name in any front-end controls (e.g. Current Selections etc.) However, this may not be suitable for you if you already have an existing field named Part Number in your script.
I am working on a transformation step for Pentaho Kettle. It selects several input columns and based on that adds two new columns during transformation. I am unable to understand (based on code from other plugins), how I can add the two new columns so that 1) steps downstream are aware of these columns and 2) i can push the transformed data into these columns.
Thanks in advance.
You might need to override meta.getStepFields() to add new ValueMetaInterface objects to the RowMetaInterface passed in. This is the standard way to add columns at runtime; however, the row's metadata (i.e. list of ValueMetaInterface objects) must be the same from row to row or else the next step in your transformation will complain.
Often when doing data-driven custom plugins, you consume as many rows as you need (using getRow()) in order to figure out what the outgoing row format/metadata will be, then you can construct a RowMetaInterface (usually using meta.getStepFields()) that will be passed into the putRow() call. If you intend to pass through the incoming fields, do something like:
RowMetaInterface outputRowMeta = getInputRowMeta().clone();
If you're creating new rows use this:
RowMetaInterface outputRowMeta = new RowMeta();
Either way when you call meta.getStepFields(outputRowMeta, ...) it should populate outputRowMeta with the appropriate fields, by adding/changing/removing ValueMetaInterface objects from outputRowMeta.
I've got a blog post using Groovy to add/replace fields in the incoming rows here:
http://funpdi.blogspot.com/2014/10/flatten-json-to-key-value-pairs-in-pdi.html
Not sure if that is similar to your use case or not. If you have more questions, feel free to find me on IRC at ##pentaho (my nick is usually mburgess_pdi)
IF i have understood your question correctly, i think you are trying to create an output file with dynamic column. So you can do this by checking on the "fast dumping" option in Text File Output Step. While doing so , donot define any column names in the "Fields" tab
Check my image below:
Hope it helps :)
I have again problem with multiple rows in db. They are about 40k rows which need to be replaced to new link. What i want is to add some text after whole link which is saved into db. My example:
UPDATE Stores SET MapView = REPLACE(MapView,'&a=b','http://link.com/xy');
But this doesnt work affcourse, it replaces whole link with a, what i want is to get like that: http://link.com/xy&a=b
Any chance to do it?
Is this?
UPDATE Stores SET MapView = concat(MapView,'&a=b');