qwertyful

CSAP_MAT_BOM_MAINTAIN and initial values

CSAP_MAT_BOM_MAINTAIN (in conjunction with CSAP_MAT_BOM_OPEN and CSAP_MAT_BOM_CLOSE) allows you to maintain values on a BOM.  CSAP_MAT_BOM_OPEN returns the current values of the BOM.  Then you just modify the fields you want to change and call CSAP_MAT_BOM_MAINTAIN.

But what if you want to clear a field that currently has a value?  If you pass an initial value to CSAP_MAT_BOM_MAINTAIN it interprets that as “leave the existing value”.  How do you tell it you want to actually remove the existing value?

The simple answer is, set the value to ‘!’.

LBBIL_INVOICE Reference Document fields

When working with SAP invoice SmartForms, you will soon become familiar with the LBBIL_INVOICE structure.  The print driver program populates this deep structure with lots of data associated with the invoice document being processed.

The LBBIL_INVOICE-HD_REF structure contains information on the various reference documents of the invoice – delivery, sales doc, etc.  However, there were a couple of fields in the structure that I was not sure of their usage: VBELN_VAG, VBELN_VKT, and VBELN_VG2 .  So, I did a little research, and am documenting my findings here. (more…)

Object Dependency assignment – “No authorization to edit the alternative”

We have a custom program that calls the function module CP_BD_DIRECT_INPUT_PLAN_EXT to assign object dependencies to routing operations.  Recently, this program failed with the error “No authorization to edit the alternative” (C\ 017).

I discovered that this error is raised by the function module CP_DI_IMPORT_KNOWLEDGE.  It compares the change master being used for the object dependency assignment to the change master on the operation to which the dependency is being assigned.  If a different change master is being used for the OD assignment, but it has the same effective date as the change master on the operation, then this error is raised.

Auth check failing in background

Today I had some logic in a user exit that worked fine when  executed interactively, but failed when it ran in the background.  Upon debugging, I found that the failure was due to an auth check.  The user ID was the same, so why would a user have authorization in foreground but not in background?

(more…)

SAP Workflow Extended Notification Configuration

The first time you open up transaction SWNCONFIG all those options can be very confusing.  There’s several tutorials out there that give you step-by-step instructions, but still leave you unclear on what you’ve actually done.  Here’s a high-level diagram I put together to help illustrate the relationships between the different configuration sections.

(more…)

SAP Workflow Notification Scheduling

When configuring SAP Workflow Extended Notifications in transaction SWNCONFIG you have to specify run schedules for both the selection of work item notifications (“Schedule Selection”) and the delivery of notifications (“Delivery Schedule”).  Each schedule has a start time, end time, and interval.

The start time is required while the end time is optional.  So, what happens when you specify a start time without an end time?

You might assume as I did that the schedule will run at the specified interval from the start time to the end of the day.  In actuality though, SAP ignores the interval and runs the schedule once at the start time.  If you want the interval taken into account you must specify both the start and end time.

SAP Workflow Extended Notification Logging

We’re changing the way we process workflow email notifications in SAP, moving from the old RSWUWFML2 method to the newer Extended Notification method.  While testing the Extended Notification by running the program SWN_SELSEN I noticed that each run generated 86 entries in the application log:

Looking closer, I saw that most of these entries were basically debugging messages: Entering and Leaving messages for each method that was called.  I don’t need that level of logging in production, so can I reduce it without turning off logging altogether?

Eventually I found that there is a parameter to control the level of logging.  It is maintained in transaction SWNCONFIG under General Settings.  The parameter name is MAX_PROBCLASS and you can set it to a value between 1 (Very Important) and 4 (Additional Information).  If no value is specified a default value of 4 is used.

You can see some additional information on this parameter by looking at the documentation for the data element BALPROBCL in SE11.

GTS Tables

A few of the main tables for product screening in SAPs Global Trade Service (GTS) module.

/SAPSLL/PR – Product master

/SAPSLL/CTSNUM -List of HTS codes and ECCN numbers and their GUIDs.

/SAPSLL/CTSNUMC -List of Schedule B numbers and their GUIDs.

/SAPSLL/PNTPR – Product master mapping.  This table has the actual product number (PRVSY).  You can use this table to look up the product’s GUID (GUID_PR).

/SAPSLL/PRCTS – Product Master – Global Customs Tariff Numbers.  Lists HTS codes and ECCN numbers for a product.

/SAPSLL/PRCTSC – Product Master – Country-Specific Customs Tariff Numbers. Lists Schedule B numbers for a product.

20,110,222,162,019/SA
Next Page »