on 02-03-2012 1:05 PM
Dear Abapers,
I hav a tode CV01N. for creating document . for that i hav a class and characteristics created by functional people.
after entering all the char.value whle saving document no ll generate automatically. now they want print out for that, so i created Z program, form and Z tcode.
Input is document No table is DRAW-DOKNR.
based on that document i hav to fetch all the characteristics value.
how can i get the char value.
already i worked on to get the value for SD colour, cutlength, remarks, lot,finish type,alloy etc..
but i tried for same logic here it is not working..
in that vbap hav a field cuobj (configuration)
So,
i used in SD,
CALL FUNCTION 'CUD0_GET_VAL_FROM_INSTANCE'
EXPORTING
instance = wplaf-cuobj
TABLES
attributes = i_char
EXCEPTIONS
instance_not_found = 1.
IF wplaf-cuobj IS NOT INITIAL .
but here like this kind of field is not ther in related table, so i given only below coding for cv01n
CALL FUNCTION 'CONVERSION_EXIT_ATINN_INPUT' " Convert into internal no (ATTIN)
EXPORTING
input = 'FORMAT_NO'
IMPORTING
output = out2 .
READ TABLE i_char WITH KEY atinn = out2.
IF sy-subrc = 0 .
temp1 = i_char-atwrt.
w_details-remarks = temp1.
In my case here sy-subrc = 4.
So its not give the out put value.
any solution for that.
Hi,
You can get the characteristics value for cv01n by using the FM "BAPI_OBJCL_GETDETAIL". The parameters you need to pass is as follows :
OBJECTKEY = DRAW-DOKAR(3) + DRAW-DOKNR(25) + DRAW-DOKVR(2) + DRAW-DOKTL(3). (Eg:BVV000000000000000000000011100000).
OBJECTTABLE DRAW
CLASSNUM The configured class name ( For example - SAP_EHS_IBD_SDS)
CLASSTYPE The configured class type ( for example - 017)
KEYDATE Current date
LANGUAGE EN
With these values, after executing the BAPI, you will get the respective details in ALLOCVALUESNUM, ALLOCVALUESCHAR and ALLOCVALUESCURR tables.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Pawan,Harish,
Thanks for ur rly.
I try to use that BAPI_OBJCL_GETDETAIL this bapi.
CALL FUNCTION 'BAPI_OBJCL_GETDETAIL'
EXPORTING
objectkey = var
objecttable = draw
classnum = 'DMS_PROJ_TRANSMITT'
classtype = '017'
KEYDATE = SY-DATUM
UNVALUATED_CHARS = ' '
LANGUAGE = SY-LANGU
IMPORTING
STATUS =
STANDARDCLASS =
tables
allocvaluesnum =
allocvalueschar =
allocvaluescurr =
return =
.
in that tables what should I mention for allocvaluesnum, allocvalueschar, allocvaluescurr and return.
Edited by: Prasath on Feb 8, 2012 6:10 AM
Edited by: Prasath on Feb 8, 2012 6:12 AM
Hi,
You have to just create internal tables with the same structure as mentioned in BAPI for allocvaluesnum, allocvalueschar, allocvaluescurr and pass it to the BAPI call. You will get the characteristics and its values in these internal tables once the BAPI gets successfully executed.
Also the OBJECTTABLE value should be 'DRAW' instead of just draw.
Hi,
thanks for ur qiuck rly.
I tried that the bapi ditectly its working fine. Its getting all the values,
but in program only,
Ya I Created internal table like below,
DATA : charnum TYPE TABLE OF allocvaluesnum.
DATA : charval TYPE TABLE OF allocvalueschar.
DATA : charcurr TYPE TABLE OF allocvaluescurr.
DATA : bapiret TYPE TABLE OF return.
but it is showing type allocvaluenum is unknown.
if i uncomment thn type allocvaluechar is unknown. like that...
Edited by: Prasath on Feb 8, 2012 7:06 AM
Hi Prasath,
Check buisness object BUS1003 in SWO1 tcode. You have BAPI_OBJCL_GETDETAIL to read the characteristics of the class.
Thanks,
Pawan
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
86 | |
10 | |
10 | |
10 | |
7 | |
6 | |
6 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.