BAPI for adding descriptions to Master Changes? - abap

I have a program that will automatically change or creates the BOM using the BAPI.
When you change, you enter the change number (AEOI-AENNR), but add a description of the change (AEOI-OITXT) there is no possibility. Now I prescribe them manually using transaction CC02. Who knows any function modules or BAPI to automatic change of data in the Master Changes to automatic after I change the specifications could automatically add a description.
EDIT (from OP comment): "The specification used CSAP_BOM_ITEM_MAINTAIN, BAPI_MATERIAL_BOM_GROUP_CREATE. They serve a number of changes, but the description for the field AEOI-OITXT have not seen."

'BAPI_ISMCHANGENUMBER_CREATE' should work to create the change number, validity date, and description.
Then simply assign that number (given in return data) to the BOM bapi call.

Related

How to find the required tables of a BAPI function?

I'm new to SAP and studying calling some predefined BAPI function using JAVA. I have a question. I open the function BAPI_QUOTATION_CREATEFROMDATA2 in SE37. In it, I found import and tables. The import is the parameters I need when calling this function, but in tables, there are about 12 tables and structures, how do I know which is the minimum requirement to call the function? Can anyone help? Thanks.
Please see the optional column, highlighted in the image below. The tables that are optional are checked. Tables that do not have 'Optional' checked are required. You can see from the image that 'QUOTATION_PARTNERS' is the required table.
Since this is a BAPI, it is a generally released function module by SAP and therefore better documented than just any other function module. Most BAPI's have good documentation that you can access in SE37 by clicking on Function Module Documentation.
Unfortunately for BAPI_QUOTATION_CREATEFROMDATA2 is looks like the developer was lazy and copy pasted it from an order creation BAPI since it mentions:
Notes
1. Required entries: ORDER_HEADER_IN : DOC_TYPE Sales document type
SALES_ORG Sales organization
DISTR_CHAN Distribution channel
DIVISION Division ORDER_PARTNERS..: PARTN_ROLE Partner role, Sold.to party
PARTN_NUMB Customer number ORDER_ITEMS_IN..: MATERIAL Material number
Luckily the documentation for the parameter itself is a bit betterL
The minimum requirement is that the sold-to party is entered at header level. Additional partner functions can then be automatically determined.

CHANGEDOCUMENT_READ_HEADERS Why can't I read the creator of an entry?

I started using CHANGEDOCUMENT_READ_HEADERS today and I need to find the creator of an entry. I've noticed that when there are no changes after the creation there will occur an error.
So if you just created an entry and try to get its changes via CHANGEDOCUMENT_READ_HEADERS, you'll get the NO_POSITION_FOUND exception. Apperantly, the creation of an entry, although it is visible in the changelog, does not count as a change.
Does anybody know a FM which allows me to find the creator of an entry?
Thanks!
The CHANGEDOCUMENT_READ_HEADERS function module searches the change documents on the table CDHDR and CDPOS, if no changes were made on the document (Purchase order, FI document, etc.) no change document will be created.
To get the creator of an entry, you will need to get it directly from the table that stores the information or BAPI for that document.
For exemple:
The purchase order creator can be found on the table EKKO (Purchasing Document Header) field ERNAM (Created by).

Find SAP modifications of function groups includes

(access key for SAP standard modifications needed for test data of this question)
Introduction:
I want to find a certain type of modification to a certain SAP standard repository object (IDES test dataset).
The modification is located in the include of a function group (it is listed under System-defined Include-files in the functionpool of the function group).
So far, I found the table SMODILOG as a central list of modifications (Log of Customer Modifications to Dev. Env. Objects).
Test Data:
My test data is function group V07A, that has e.g. the include LV07A014 (Part of the LV07ANNN include). This was modified by inserting stuff in its source code (one needs an access key in order to be allowed to do this) such as:
*{ INSERT IDSEXAMPLE 1
* this is a comment, which was added
*} INSERT
Goal:
Subsequently I want to find a table where all modifications like this are listed. I want to find the place of modification, i.e. the object type and program id of the object that was modified.
2 Questions:
I realize that the SAP standard include of a function group has a different object type and program ID than the top-include and uxx-includes.
Whereas the latter are of type PROG and prgmid R3TR (found in object catalog entry), the LV07A014 has an object catalog entry identical to the function group that it belongs to, namely R3TR FUGR. This is already peculiar to me. This seems to me as if the resolution to the sub-level (include level) is missing.
In addition, the modification to LV07A014 is listed in table SMODILOG as having the object type (field sub_type) REPS (the pgmid is not included in SMODILOG). I would expect PROG, as for the other inclueds (LTOP, LUXX).
-> Why is there a difference of object types, programids between L_TOP, L_UXX on the one hand and L_NNN Inclues on the other? (Or am I mistaken?)
-> Where can I find information of all SAP standard modifications in my system and the true object type,pgmid belonging to these modified objects (and not the function group that the modified object belongs to, this resolution does not suffice)?
There is no table or something similar where all modifications are listed. The table E071 is a good source to check pgmid and object type.
Why there is a difference of object types, program IDs between L_TOP, L_UXX on the one hand and L_NNN Includes on the other remains a mystery. SAP...
Why do you need a table? For what? Is it purely academic question or connected with real life tasks?
Have you ever tried SE95 transaction? It lists all modifications that were done in system disregard of object type and name. Yes, and function groups too. They are easily searchable by hierarchy
If it is FUGR include that was modified, then it will be listed in the node Outside of modularization units
Finally RTFM, bro...

Rally Lookback, Snapshot with empty custom field

I am trying to get a snapshot of deleted userstory to get value for a custom field(c_Dep). I get the snapshot but the custom field is empty. It had value in it. Does lookback not save value for cutomer created cutom field?
findConfig: {
_TypeHierarchy: 'HierarchicalRequirement',
"ObjectID": 12345,
"_ValidFrom": {
"$lte": "2017-01-25T19:00:57.475Z"
}
Sarita, It is hard to tell from the information you have given what is going on precisely. However, I can give you some pointers
The Lookback API will store changes in values for custom fields. The selection you have shown is valid from 24thJan to 25thJan. During this period was the custom field set? Probably not, because the array is only one long and I think it is showing the creation event.
Was the custom field updated to contain something after this time period?
The reason for asking is that a common misunderstanding is that the records stored in the lookback database will hold the current value of fields - it doesn't. It holds the changes in fields. If c_Dependencies didn't change during that time period, you may not see an entry returned in the array. The next entry in the database might be the record where the c_Dependencies field was set (changed from null to something) and that might be 'after' your time period filter.
It looks like your query is requesting snapshots earlier than 2017/1/25 ($lte). Since there's only one, it's probably the creation snapshot. If you get all snapshots for the ObjectID by removing the _ValidFrom parameter, you should see the changes made to c_Dep after artifact creation.
As I am not allowed to comment, I have to post a new answer.
I think William Scott meant remove the ValidTo filter. The one you have is the creation change. The update will be afterwards.

Keeping dValIds For auto-generated dimensions consistent

I am working with Endeca 6.4.1 and have many auto-generated dimensions present in my pipeline (mapped using Dev-studio), the application's indexing is CAS-less. So only FCM is creating Dimensions and assigning dValIds. I am using Endeca SEO, so the dVal Id directly reflects in my URL, and if an auto-gen dimension's value's Id changes, a link to that navigation State is lost.
I have a flat file as the dimension's source, for example
product.feature|neon finish
What I want is that, if the value some day changes to Neon-finish or Neon color, the dValId that was assigned to neon finish should be transferred to the new value. I can keep a custom mapping of the change to track that neon finish has been changed to a new value.
Is there any way to achieve this, may be by using some manipulators?
Please share your thoughts.
There are two basic ways to do this:
1) Update the state files when you change a dimension value (APPDIR/data/state/autogen_dimensions.xml ). This would most likely be a manual process.
2) A more robust but complex solution is to change the dimension values to be some ID number and use a synonym for the display name. Then the display name can change without a change to the id number. This may require some serious changes to your pipeline.
Good luck