Дело в том, что не работает только в двух транзакциях - vf02 и vf03.
В других транзакциях, использующих прайсинговую процедуру падений нет, assign нормально назначается.
Исследования показали, что XVBRP определена не как таблица в глобальной области видимости, а является tables аргументом функции
RV_INVOICE_PRICE_PBO. А для атрибутов этой функции стоит галочка Global.
Смотрю по стеку вызовов, эта функция не вызывалась, а вызывалась
PRICING_SUBSCREEN_PBO. Получется, что атрибуты функции, определенные как глобальные, видимы только если эта функция стоит выше по стеку вызовов. В этом отличие от таблиц, определенных глобально.
Причины падения понятны, вопрос, как проверить допустимость assign остается открытым
pic2.JPG
Description:
галочка Global в атрибутах Функции
Filesize:
38.79 KB
Viewed:
29473 Time(s)
pic1.JPG
Description:
Filesize:
24.86 KB
Viewed:
29475 Time(s)
Last edited by request on Wed Feb 13, 2008 5:47 pm; edited 2 times in total
Age: 46 Joined: 05 Nov 2007 Posts: 725 Location: КраснАдар
Posted: Wed Feb 13, 2008 6:04 pm Post subject:
Так вроде линковать нельзя. Только данные из топ-инклюда можно.
А галочка эта говорит о том, что внутри самого ФМ-ника можно будет работать с интерфейсными параметрами, как с глобально-определенными.
К примеру, при вызове подпрограммы внутри ФМ можно узнать, что в этой таблице не передавая ее в подпрограмму.
Age: 46 Joined: 05 Nov 2007 Posts: 725 Location: КраснАдар
Posted: Wed Feb 13, 2008 6:08 pm Post subject:
Так говорит справка:
Quote:
Индикатор для глобального интерфейса
You mark this field if the interface of the function module was made known globally through Edit -> Interface -> Globalize Parameters.
In this case, all the parameters that are fully typed and are defined for value transfer are treated as if global data objects with the same name were declared in the top-include - that is, they are visible in the entire function group and keep their value when the function module is exited. When the function module is called, all the parameters of a global interface are initialized and they get their defalut value.
All the other parameters are treated as if data objects of the same name were declared in the top Include (for table parameters, these are two in each case - one for the table body, one for the header line). But they can only be used during execution of the function module. This means they are visible in the entire function group, but they can only be accessed during execution of the function module. If such a parameter is accessed outside of actual execution of the function module, you get a runtime error GETWA_NOT_ASSIGNED with the meaning "Field symbol is not yet assigned" (such parameters are implemented internally through field symbols to which a data object is assigned during execution of the function module).
In the function group, no global data objects with the same name - such as a parameter of a global interface - may be created. If several function modules of a function group have global interfaces, parameters of the same name must be defined identically.
Note
The use of global interface parameters is obsolete and, in the new function modules, interfaces should generally not be globalized.
может быть надо указать именно таблицу а не рабочую область?
ASSIGN ('(SAPLV60A)VBRP[b][]/b]') TO <fs_vbrp>.
Mike1, извините, ввел в заблуждение. Падение на строке, как указано в самом первом сообщении.
FIELD-SYMBOLS: <fs_txvbrp> TYPE ttvbrp.
ASSIGN ('(SAPLV60A)XVBRP[]') TO <fs_txvbrp>.
Строка
ASSIGN ('(SAPLV60A)VBRP[b][]/b]') TO <fs_vbrp>
нормально отрабатывает, но и VBRP - это таблица, объявленная в TOP, а не в глобальных параметрах функции.
дамп GETWA_NOT_ASSIGNED возникает при попытке обратится к неназначенному указателю, на самом операторе assign возможны дампы:
Quote:
Non-Catchable Exceptions
Cause: The field symbol is structured and the field to be assigned is shorter than the structure.
Runtime Error: ASSIGN_BASE_TOO_SHORT
Cause: The alignment of the field f is too small for the type of the field symbol.
Runtime Error: ASSIGN_BASE_WRONG_ALIGNMENT
Cause: You can only specify simple types for TYPE.
Runtime Error: ASSIGN_CAST_COMPLEX_TYPE
Cause: The source field is longer than 16 bytes and can therefore not be interpreted as a field of type P.
Runtime Error: ASSIGN_CAST_P_TOO_LARGE
Cause: The alignment of the field f is too small for the type specified in TYPE.
Runtime Error: ASSIGN_CAST_WRONG_ALIGNMENT
Cause: The field f has a length which is not compatible with the type specified in TYPE.
Runtime Error: ASSIGN_CAST_WRONG_LENGTH
Cause: The type specified in TYPE is unknown.
Runtime Error: ASSIGN_CAST_WRONG_TYPE
Cause: A maximum of 14 decimal places is allowed.
Runtime Error: ASSIGN_DECIMALS_TOO_HIGH
Cause: Decimal places may only be specified for type P.
Runtime Error: ASSIGN_DECIMALS_WRONG_TYPE
Cause: A length of 0 was specified for the field f.
Runtime Error: ASSIGN_LENGTH_0
Cause: A length less than 0 was specified for the field f.
Runtime Error: ASSIGN_LENGTH_NEGATIVE
Cause: An offset less than 0 was specified for the field f.
Runtime Error: ASSIGN_OFFSET_NEGATIVE
Cause: Offset and length were specified for the field f, and the data type of the field to be assigned does not allow subfield access. (This applies to the data types I, F, and P.)
Runtime Error: ASSIGN_OFFSET_NOTALLOWED
Cause: The offset specified for the field f reaches beyond the range of the ABAP variable.
Runtime Error: ASSIGN_OFFSET_TOOLARGE
Cause: In the area addressed by offset and length specifications for field f, there are deep components (data references, object references, strings, internal tables) that cannot be overwritten.
Runtime Error: ASSIGN_OFF+LENGTH_ILLEGAL_CAST
Cause: The offset and length specified for the field f reach beyond the range of the ABAP variable.
Runtime Error: ASSIGN_OFFSET+LENGTH_TOOLARGE
Cause: The field f is not a data reference. However, the system expected a data reference.
Runtime Error: ASSIGN_REFERENCE_EXPECTED
Cause: The components of the source field type and the target type, which are strings, tables or references, do not have exactly the same offset and type.
Runtime Error: ASSIGN_STRUCTURE_ILLEGAL_CAST
Cause: You cannot assign substrings to a field symbol.
Runtime Error: ASSIGN_SUBSTRING_NOT_ALLOWED
Cause: The field symbol is typed, and the field to be assigned has a type which is incompatible.
Runtime Error: ASSIGN_TYPE_CONFLICT
Cause: The type of the source field contains strings, tables or references.
Runtime Error: ASSIGN_TYPE_ILLEGAL_CAST
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum You cannot attach files in this forum You can download files in this forum
All product names are trademarks of their respective companies. SAPNET.RU websites are in no way affiliated with SAP AG. SAP, SAP R/3, R/3 software, mySAP, ABAP, BAPI, xApps, SAP NetWeaver and any other are registered trademarks of SAP AG. Every effort is made to ensure content integrity. Use information on this site at your own risk.