VC_I_GET_CONFIGURATION
Hi ,
Is there any alternative FM for VC_I_GET_CONFIGURATION?? which works similar to get the variant configuration .
Thanks,
Vind.
Try
CE_I_GET_CONFIGURATION
VC_I_GET_CONFIGURATION
VC_I_GET_CONFIGURATION_IBASE
CUCQ_GET_CONFIGURATION_PARAMS
CUD9_CONFIGURATION_GET
And also check Fm related to package u201CCUu201D
Good Luck !
^Saquib
Similar Messages
-
VC_I_GET_CONFIGURATION and paging memory
Hi everyone
I am modifying an existing program that makes use of the VC_I_GET_CONFIGURATION FM. Under certain conditions SAP will throw a 'memory_no_more_paging' error. This always happens at line 55 of the SET_MD_TO_BUFFER Form, which is called from within the form SETUP_MASTER_DATA, which is in turn called from VC_I_GET_CONFIGURATION. The FM module is called from within a loop round an itab that holds VBAP records for a customer. If the number of records is reasonably large (by our standards - >5000) then this error seems to occur.
Looking at the code and debugging to see what is happening, it looks as if a config. table of about 400 rows is being repeatedly read and Exported to memory. I think that this is acting as a buffer because prior to this a check is made to see if the exact combination has already been read. I guess this is why the memory error is being triggered. Has anybody else experienced this? Is there anything I can do apart from requesting more hardware or re-writing the bespoke program?
Thanks in advance...
Andy
Message was edited by: Andrew Wright
Hi
Just wanted to keep this one going - I'm no closer to figuring it out!Hi Bala
This change has since gone into our production system where we had real performance issues. I have been improving the performance of the program as a whole and at nno point have I found using VC_I_GET_CONFIGURATION_IBASE to be the cause of any performance problems - its generally been down to bad SQL! Using this version of the function has compeltely solved the original problem (short dumps because the memory ran out). I haven't personally tried creating a custom function to use the VC_I_GET_CONFIGURATION version because there didn't seem to be any point - after all it was using less memory and ran faster! The OSS note states that the VC_I_GET_CONFIGURATION uses the buffer to improve online performance and so is not designed for mass updates. I'm not sure I follow the logic there since I wold have thought that mass updates would be precisely when you want to make use of buffered data. If you have any thoughts on that matter I would be interested to know.
Kind regards
Andy -
What is FM VC_I_GET_CONFIGURATION actually used for?
Hello ABAP Gurus
I just want know what actually the FM VC_I_GET_CONFIGURATION used for.
What are the input parameters for this function and also what kind of information can I get by calling this FM.
Any feedback on this will be greatly appreciated.
Thanks
RamHi Ram,
<b>
VC_I_GET_CONFIGURATION</b> is used to find charateristic value and characteristic description for the given class type and batch number (CHARG) of a material.
call function 'VC_I_GET_CONFIGURATION'
exporting
INSTANCE = <b>vbap-cuobj</b>
LANGUAGE = SY-LANGU
TABLES
CONFIGURATION = i_config
EXCEPTIONS
INSTANCE_NOT_FOUND = 1
INTERNAL_ERROR = 2
NO_CLASS_ALLOCATION = 3
INSTANCE_NOT_VALID = 4
OTHERS = 5.
Reward if useful.
Thanks
Aneesh. -
Hi all,
I have used VC_I_GET_CONFIGURATION in my programs.
It is taking lot of time to get that material characteristics.
Is there any other method to get all material characteristics other than FM : VC_I_GET_CONFIGURATION.
If any body have solution please help me in this issue.
Thanks & Regards,
ShankarTry using BAPI_CLASS_GET_CHARACTERISTICS...
Thanks,
Anon -
SalesOrder characteristics are not retrieved using VC_I_GET_CONFIGURATION
Hi,
We are using ECC 5.0. Some time back there was a requirement and I implemented BADI BDCP_BEFORE_WRITE to not generate change pointers for some particular type of Sales Order.
Now when we use function module(s) CUD0_GET_VAL_FROM_INSTANCE, VC_I_GET_CONFIGURATION, VC_I_GET_CONFIGURATION_IBASE or even try to use the value VBAP-CUOBJ and try to check in table AUSP we don't find a match for the same.
But when we use VA03 t-code and go to the configuration display of that item, it shows up the values.
Could someone please help me understand how can I retrieve those values using a function or a selct statement to get the characteristics values for the line item of the order.
thanks
SatyaHi Pal,
Sorry i am checking your post late.
Even i faced the same problem earlier. But i found out the reason behind this. The function module related to Variant configuration will only gives the data existing in database. but where as the CU50 screen shows the data which was recorded recently. but there may be a chance that this data not existing in the database.
This depends on how you managed the data. To find out whether it is existing in the database or not.
Check the Environment - Change Documents where in you will find whether the characteristic result is added/deleted/updated.
so lets say if a value is entered and is updated in the database and later is been modified but not updated properly. this case you will see the valued which is updated but not the latter one.
Kindly ask me if you need any other details.
Thanks & Regards,
Srinivas.D -
Relationship between atwrt & idnrk fields
Hi,
I am working on Quote BOM Sales report. Where the user will enter the sales document number. Based on the sales order number it has print all the characteristic values.I retrieved the materials and characteristics values associated with the sales document number using FM VC_I_GET_CONFIGURATION. Now i want to know is there any way that i can find the component name using the ATWRT and ATWTB fields which i got from the FM VC_I_GET_CONFIGURATION. I need to print the component based on the characteristic and Characteristic description.
Thanks in advanceHi Niranchan,
PERNER is used to identify a person (in the HR module Particularly). Basicaly it is used to identify an employee of the org. Where as, BNAME in USR02 is to identify the R3 users.
Say you are an employee of a company named INF using SAP HR module for payroll, there will be a PERNER maintained for you in their system. But you will not necessarily have a BNAME in USR02, since you are not a registered user of the R3 system used for payroll processing. -
error analysis as in ST22 TRANSACTION:
AN EXCEPTION OCCURED THE EXCEPTION ASSIGNED TO CLASS CX_SY_CONVERSION_NO_NUMBER WAS NOT CAUGHT WHICH LED TO AN ERROR. THE REASON FOR THIS EXCEPTION IS :
THE PROGRAM TRIED TO INTERPRET VALUE ':4' AS NUMBER SINCE THE VALUE CONTRAVENES THE CORRECT NUMBER FORMAT THIS WAS NOT POSSIBLE.
ATTACHED IS MY PROGRAM
REPORT ZVXR0303
LINE-COUNT 60(3)
LINE-SIZE 132
MESSAGE-ID VN.
Tables: VBEP, VBAP, NAST.
DATA: BEGIN OF HEADER,
ORDER(15) VALUE 'ORDER',
LINE(5) VALUE 'LINE',
MATERIAL(14) VALUE 'MATERIAL',
DUE(15) VALUE 'DUE (MAD)',
CREATED(10) VALUE 'CREATED',
QTY(10) VALUE 'QUANTITY',
KEY(5) VALUE 'KEY',
TYPE(5) VALUE 'TYPE',
END OF HEADER.
DATA: Begin of IDAT OCCURS 0,
VBELN LIKE VBAP-VBELN,
POSNR LIKE VBAP-POSNR,
werks LIKE VBAP-WERKS,
cuobj LIKE vbap-CUOBJ,
MBDAT LIKE vbep-mbdat,
ERDAT LIKE VBAP-ERDAT,
MATNR LIKE VBAP-MATNR,
KWMENG LIKE VBAP-KWMENG,
QTY TYPE I,
END of IDAT.
class cl_abap_char_utilities definition load.
constants: tab type c value cl_abap_char_utilities=>HORIZONTAL_TAB.
DATA: t_record(1000) TYPE C.
DATA: C_KWMENG(20) TYPE C.
data: OUTFILE(50) value '/usr/users/ftpsapfi/locks_540318'.
DATA: BEGIN OF TKOMCON OCCURS 50.
INCLUDE STRUCTURE CONF_OUT.
DATA: END OF TKOMCON.
DATA: iKEY TYPE I,
offset TYPE I,
KeyTypeLOC TYPE I,
KeyNumberLOC TYPE I,
type(15) TYPE C.
select-options: sVBELN FOR VBEP-VBELN obligatory,
sMAD FOR VBEP-MBDAT obligatory,
sERDAT FOR VBAP-ERDAT,
sMATNR FOR VBAP-MATNR,
sWERKS FOR VBAP-WERKS,
sKWMENG FOR VBAP-KWMENG.
SELECT
vbap~vbeln
vbap~POSNR
vbap~werks
vbap~cuobj
VBEP~MBDAT
VBAP~ERDAT
VBAP~MATNR
VBAP~KWMENG
INTO CORRESPONDING FIELDS of IDAT
FROM ( VBEP INNER JOIN VBAP ON vbepvbeln = vbapvbeln
AND vbepposnr = vbapposnr )
WHERE BMENG > 0
AND vbep~MBDAT IN sMAD
AND VBEP~VBELN in sVBELN
AND VBAP~werks IN sWERKS
AND VBAP~ERDAT IN sERDAT
AND VBAP~MATNR IN sMATNR
AND VBAP~KWMENG IN sKWMENG
AND VBAP~ABGRU = SPACE.
APPEND IDAT.
ENDSELECT.
PERFORM TOP-OF-PAGE.
if sy-batch = 'x'.
OPEN DATASET OUTFILE FOR OUTPUT IN TEXT MODE ENCODING DEFAULT.
TRANSFER t_record TO OUTFILE.
endif.
IF SY-SUBRC = 0.
LOOP at IDAT.
write IDAT-KWMENG DECIMALS 0 TO C_KWMENG.
REFRESH TKOMCON.
CALL FUNCTION 'VC_I_GET_CONFIGURATION'
EXPORTING
INSTANCE = idat-cuobj
LANGUAGE = NAST-SPRAS
TABLES
CONFIGURATION = TKOMCON
EXCEPTIONS
OTHERS = 4.
LOOP AT TKOMCON
WHERE ATNAM = 'S_SK_SPEC_KEY' OR ATNAM = 'S_MK_SPEC_KEY'
OR ATNAM = 'S_SK_CONSC_KEY' OR ATNAM = 'S_MK_CONSC_KEY'.
IF TKOMCON-ATNAM = 'S_SK_CONSC_KEY'
OR TKOMCON-ATNAM = 'S_MK_CONSC_KEY'.
KeyTYPELOC = 0.
keynumberloc = 2.
TRANSLATE TKOMCON-ATWRT+KeyNumberLOC(4) USING ': '.
IF TKOMCON-ATWRT+KeyNumberLOC(4) CO '0123456789 '.
iKey = TKOMCON-ATWRT+KeyNumberLOC(4).
IF ( TKOMCON-ATWRT+KeyTypeLOC(2) = 'FR' AND iKey >= 454 )
OR ( TKOMCON-ATWRT+KeyTypeLOC(2) = 'XF' AND iKey >= 1150 ).
PERFORM OUT-OF-RANGE-FOUND.
ENDIF.
ENDIF.
Else.
Offset = 0.
DO.
IF offset <= 9.
offset = offset + 1.
If TKOMCON-ATWRT+Offset(1) = ':'.
KeyTypeLOC = Offset + 1.
KeyNumberLOC = Offset + 3.
EXIT.
ENDIF.
ELSE.
EXIT.
ENDIF.
ENDDO.
TRANSLATE TKOMCON-ATWRT+KeyNumberLOC(4) USING ': '.
IF TKOMCON-ATWRT+KeyNumberLOC(4) CO '0123456789 '.
iKey = TKOMCON-ATWRT+KeyNumberLOC(4).
IF ( TKOMCON-ATWRT+KeyTypeLOC(2) = 'FR' AND iKey >= 454 )
OR ( TKOMCON-ATWRT+KeyTypeLOC(2) = 'XF' AND iKey >= 1150 ).
IDAT-KWMENG = TKOMCON-ATWRT(3).
PERFORM OUT-OF-RANGE-FOUND.
ENDIF.
ENDIF.
ENDIF.
ENDLOOP.
ENDLOOP.
ENDIF.
CLOSE DATASET OUTFILE.
FORM OUT-OF-RANGE-FOUND *
FORM OUT-OF-RANGE-FOUND.
WRITE: / IDAT-VBELN.
WRITE: 10 IDAT-POSNR.
WRITE: 20 IDAT-MATNR.
WRITE: 35 IDAT-MBDAT.
WRITE: 50 IDAT-ERDAT.
WRITE: 65(3) IDAT-KWMENG DECIMALS 0.
WRITE: 75 TKOMCON-ATWRT+KeyTypeLOC(6).
IF TKOMCON-ATNAM = 'S_SK_CONSC_KEY'
OR TKOMCON-ATNAM = 'S_MK_CONSC_KEY'.
WRITE: 85 'Consecutive'.
ELSE.
WRITE: 85 'Specific'.
ENDIF.
IF TKOMCON-ATNAM = 'S_SK_CONSC_KEY'
OR TKOMCON-ATNAM = 'S_MK_CONSC_KEY'.
TYPE = 'Consecutive'.
ELSE.
TYPE = 'Specific'.
ENDIF.
* PREPARING A RECORD TO BE SENT TO FILE
CONCATENATE
IDAT-VBELN
IDAT-POSNR
IDAT-MATNR
IDAT-MBDAT
IDAT-ERDAT
C_KWMENG
TKOMCON-ATWRT+KeyTypeLOC(6)
TYPE
INTO t_record SEPARATED BY tab.
if sy-batch = 'x'.
TRANSFER t_record TO OUTFILE.
endif.
ENDFORM.
FORM TOP-OF-PAGE *
FORM TOP-OF-PAGE.
WRITE: / 'ORDER'.
WRITE: 10 'LINE'.
WRITE: 20 'MATERIAL'.
WRITE: 35 'DUE (MAD)'.
WRITE: 50 'CREATED'.
WRITE: 65 'QTY'.
WRITE: 75 'KEY'.
WRITE: 85 'TYPE'.
PREPARING A RECORD TO BE SENT TO FILE
CONCATENATE
header-ORDER
header-LINE
header-MATERIAL
header-DUE
header-CREATED
header-QTY
header-KEY
header-TYPE
INTO t_record SEPARATED BY tab.
ENDFORM.
THIS IS WORKING FINE WITH DIFFERENT RANGES BUT WHEN I USE RANGE
Sales Order 1250000 TO 2250000
MAD 01/18/2005 TO 03/02/2005
Material LOCK9250FR TO LOCK9250XF
PLANT 4500
IT GIVES THE RUNTIME ERROR I MENTIONED ABOVE
ANY HELP WOULD BE GREATLY APPRECIATED
THANKS.HI ROB YOUR REPLY LOOKS TO BE VERY CLOSE OTHER GUYS SAID IT MIGHT BE PROBLEM WITH VARIABLE C_KWMENG BUT I REMOVED THAT PIECE OF CODE WITH C_KWMENG BUT STILL I WAS GETTING THE ERROR ATTACHED IS THE COMPLETE ERROR DETAILS FROM ST22
Runtime Errors CONVT_NO_NUMBER
Exception CX_SY_CONVERSION_NO_NUMBER
Occurred on 09/29/2005 at 14:33:21
Unable to interpret "04:" as a number.
What happened?
Error in ABAP application program.
The current ABAP program "ZVXR0303" had to be terminated because one of the
statements could not be executed.
This is probably due to an error in the ABAP program.
What can you do?
Print out the error message (using the "Print" function)
and make a note of the actions and input that caused the
error.
To resolve the problem, contact your SAP system administrator.
You can use transaction ST22 (ABAP Dump Analysis) to view and administer
termination messages, especially those beyond their normal deletion
date.
Error analysis
An exception occurred. This exception will be dealt with in more detail
below. The exception, assigned to the class 'CX_SY_CONVERSION_NO_NUMBER', was
not caught, which
led to a runtime error. The reason for this exception is:
The program attempted to interpret the value "04:" as a number, but
since the value contravenes the rules for correct number formats,
this was not possible.
How to correct the error
Integers are represented in ABAP using a sequence of digits and, in some
cases, a preceding sign.
The system offers the following options for displaying floating point
numbers:
[mantissa]E[sign][exponent]
[whole number part].[fractional part]
e.g. -12E+34, +12E-34, 12E34, 12.34
If the error occurred in one of your own programs or in an SAP program
that you modified, try to correct it yourself.
You may able to find an interim solution to the problem
in the SAP note system. If you have access to the note system yourself,
use the following search criteria:
"CONVT_NO_NUMBER" CX_SY_CONVERSION_NO_NUMBERC
"ZVXR0303" or "ZVXR0303"
"START-OF-SELECTION"
If you cannot solve the problem yourself, please send the
following documents to SAP:
1. A hard copy print describing the problem.
To obtain this, select the "Print" function on the current screen.
2. A suitable hardcopy prinout of the system log.
To obtain this, call the system log with Transaction SM21
and select the "Print" function to print out the relevant
part.
3. If the programs are your own programs or modified SAP programs,
supply the source code.
To do this, you can either use the "PRINT" command in the editor or
print the programs using the report RSINCL00.
4. Details regarding the conditions under which the error occurred
or which actions and input led to the error.
System environment
SAP Release.............. "620"
Application server....... "grrsap54"
Network address.......... "10.80.96.102"
Operating system......... "HP-UX"
Release.................. "B.11.11"
Hardware type............ "9000/800"
Character length......... 8 Bits
Pointer length........... 64 Bits
Work process number...... 3
Short dump setting....... "full"
Database server.......... "grrsap54"
Database type............ "ORACLE"
Database name............ "D01"
Database owner........... "SAPR3"
Character set............ "en_US.iso88591"
SAP kernel............... "640"
Created on............... "Aug 28 2005 20:25:49"
Created in............... "HP-UX B.11.00 A 9000/800"
Database version......... "OCI_920 "
Patch level.............. "88"
Patch text............... " "
Supported environment....
Database................. "ORACLE 8.1.7.., ORACLE 9.2.0.., ORACLE
10.1.0.."
SAP database version..... "640"
Operating system......... "HP-UX B.11"
User, transaction...
Client.............. 050
User................ "NSHAKER"
Language key........ "E"
Transaction......... "SE38 "
Program............. "ZVXR0303"
Screen.............. "SAPMSSY0 1000"
Screen line......... 6
Information on where terminated
The termination occurred in the ABAP program "ZVXR0303" in
"START-OF-SELECTION".
The main program was "ZVXR0303 ".
The termination occurred in line 156 of the source code of the (Include)
program "ZVXR0303"
of the source code of program "ZVXR0303" (when calling the editor 1560).
Source code extract
Caution: Program has changed
Caution: At time of termination, Active source code no longer available
001260 ? TRANSLATE TKOMCON-ATWRT+KeyNumberLOC(4) USING ': '.
001270 ? IF TKOMCON-ATWRT+KeyNumberLOC(4) CO '0123456789 '.
001280 ? iKey = TKOMCON-ATWRT+KeyNumberLOC(4).
001290 ?
001300 ? IF ( TKOMCON-ATWRT+KeyTypeLOC(2) = 'FR' AND iKey >= 454 )
001310 ? OR ( TKOMCON-ATWRT+KeyTypeLOC(2) = 'XF' AND iKey >= 1150 ).
001320 ? PERFORM OUT-OF-RANGE-FOUND.
001330 ? ENDIF.
001340 ? ENDIF.
001350 ? Else.
001360 ? Offset = 0.
001370 ? DO.
001380 ? IF offset <= 9.
001390 ? offset = offset + 1.
001400 ? If TKOMCON-ATWRT+Offset(1) = ':'.
001410 ? KeyTypeLOC = Offset + 1.
001420 ? KeyNumberLOC = Offset + 3.
001430 ? EXIT.
001440 ? ENDIF.
001450 ? ELSE.
001460 ? EXIT.
001470 ? ENDIF.
001480 ? ENDDO.
001490 ?
001500 ? TRANSLATE TKOMCON-ATWRT+KeyNumberLOC(4) USING ': '.
001510 ?
001520 ? IF TKOMCON-ATWRT+KeyNumberLOC(4) CO '0123456789 '.
001530 ? iKey = TKOMCON-ATWRT+KeyNumberLOC(4).
001540 ? IF ( TKOMCON-ATWRT+KeyTypeLOC(2) = 'FR' AND iKey >= 454 )
001550 ? OR ( TKOMCON-ATWRT+KeyTypeLOC(2) = 'XF' AND iKey >= 1150 ).
? IDAT-KWMENG = TKOMCON-ATWRT(3).
001570 ? PERFORM OUT-OF-RANGE-FOUND.
001580 ? ENDIF.
001590 ? ENDIF.
001600 ? ENDIF.
001610 ? ENDLOOP.
001620 ? ENDLOOP.
001630 ? ENDIF.
001640 ? CLOSE DATASET OUTFILE.
001650 ?
001660 ? *----
001670 ? * FORM OUT-OF-RANGE-FOUND *
001680 ? *----
001690 ? * ........ *
001700 ? *----
001710 ? FORM OUT-OF-RANGE-FOUND.
001720 ?
001730 ? WRITE: / IDAT-VBELN.
001740 ? WRITE: 10 IDAT-POSNR.
001750 ? WRITE: 20 IDAT-MATNR.
Contents of system fields
SY field contents..................... SY field contents.....................
SY-SUBRC 0 SY-INDEX 44
SY-TABIX 7 SY-DBCNT 1
SY-FDPOS 4 SY-LSIND 0
SY-PAGNO 2 SY-LINNO 18
SY-COLNO 94 SY-PFKEY
SY-UCOMM SY-TITLE Out of Range Keys
SY-MSGTY I SY-MSGID SF
SY-MSGNO 616 SY-MSGV1
SY-MSGV2 SY-MSGV3
SY-MSGV4
Active calls / events
No.... Type........ Name..........................
Program
Include Line
Class
1 EVENT START-OF-SELECTION
ZVXR0303
ZVXR0303 156
Chosen variables
1 EVENT START-OF-SELECTION
ZVXR0303
ZVXR0303 156
%_SPACE
2
0
SY-REPID ZVXR0303
5555333322222222222222222222222222222222
A682030300000000000000000000000000000000
TKOMCON-ATWRT 04:XF1260
333543333222222222222222222222
04A861260000000000000000000000
KEYNUMBERLOC 5
0000
0005
SYST-REPID ZVXR0303
5555333322222222222222222222222222222222
A682030300000000000000000000000000000000
SY-LDBPG SAPDB__S
5454455522222222222222222222222222222222
31042FF300000000000000000000000000000000
IKEY 1260
000E
004C
KEYTYPELOC 3
0000
0003
SY ###,####################################
0002000000000001000000000000000000000000
000C00020007000E00000001000A000000000000
... + 40 ###########^###<########################
0000000000050003000100080000000000000009
00010004000E000C000200040000000000000000
... + 80 ########################################
0000000000000000000000000000000000000000
0000000000000000000A00000000000000000000
... + 120 #######################################_
0000000000000000000000000000000000010005
00000000000000000000000000000000000A000F
... + 160 ############ÿÿ¹°XC############# E2 X1
000000000000FFBB540000000000000222432253
0000000A0000FF90830040000C0000C000520081
... + 200 000 ####__S 050
3332222222220000555222222222222222223332
0000000000000000FF3000000000000000000500
... + 240 00
222223322222222
000000000000000
SVBELN IBT00012500000002250000
44533333333333333333333
92400012500000002250000
IDAT-KWMENG ########
00000000
0000000C
TKOMCON-ATWRT+0(3) 04:
333
04A
SYST ###,####################################
0002000000000001000000000000000000000000
000C00020007000E00000001000A000000000000
... + 40 ###########^###<########################
0000000000050003000100080000000000000009
00010004000E000C000200040000000000000000
... + 80 ########################################
0000000000000000000000000000000000000000
0000000000000000000A00000000000000000000
... + 120 #######################################_
0000000000000000000000000000000000010005
00000000000000000000000000000000000A000F
... + 160 ############ÿÿ¹°XC############# E2 X1
000000000000FFBB540000000000000222432253
0000000A0000FF90830040000C0000C000520081
... + 200 000 ####__S 050
3332222222220000555222222222222222223332
0000000000000000FF3000000000000000000500
... + 240 00
222223322222222
000000000000000
OUTFILE /usr/users/ftpsapfi/locks_540318
2777277677267776766266667533333322222222
F532F53523F64031069FCF3B3F54031800000000
... + 40
2222222222
0000000000
Application Calls
No dump information available
Application Information
No dump information available
Internal notes
The termination occurred in the function "ab_Move" of the SAP
Basis System, specifically in line 529 of the module
"//bas/640_REL/src/krn/runt/abmove1.c#6".
The internal operation just processed is "MOVE".
The internal session was started at 20050929142552.
Active calls in SAP kernel
( 0) 0x4000000001751924 CTrcStack2 + 0x2bc dw.sapD01_DVEBMGS00
( 1) 0x4000000001751658 CTrcStack + 0x18 dw.sapD01_DVEBMGS00
( 2) 0x4000000001db7478 rabax_CStackSave__Fv + 0x100 dw.sapD01_DVEBMGS00
( 3) 0x4000000001dc3abc ab_rabax + 0x1e1c dw.sapD01_DVEBMGS00
( 4) 0x4000000001b44cb4 ab_cnverr__FiPcPCvN21T2 + 0x18c dw.sapD01_DVEBMGS00
( 5) 0x40000000016c96f8 ab_Move + 0x1910 dw.sapD01_DVEBMGS00
( 6) 0x40000000016d4434 ab_jmove__Fv + 0x384 dw.sapD01_DVEBMGS00
( 7) 0x4000000001022348 ab_extri__Fv + 0x17a0 dw.sapD01_DVEBMGS00
( 8) 0x4000000001726dc8 ab_xevent__FPCc + 0x38 dw.sapD01_DVEBMGS00
( 9) 0x40000000019f7efc ab_trigg__Fv + 0x94 dw.sapD01_DVEBMGS00
(10) 0x40000000019dc9ec ab_run + 0xc4 dw.sapD01_DVEBMGS00
(11) 0x4000000000f65e0c N_ab_run + 0x14 dw.sapD01_DVEBMGS00
(12) 0x4000000000f5fa88 dynpmcal + 0x198 dw.sapD01_DVEBMGS00
(13) 0x4000000000f5d500 dynppai0 + 0x830 dw.sapD01_DVEBMGS00
(14) 0x4000000000f5b8b4 dynprctl + 0x43c dw.sapD01_DVEBMGS00
(15) 0x4000000000f56728 dynpen00 + 0x2118 dw.sapD01_DVEBMGS00
(16) 0x400000000102f1b4 Thdynpen00 + 0x69c dw.sapD01_DVEBMGS00
(17) 0x400000000102e1e4 TskhLoop + 0x523c dw.sapD01_DVEBMGS00
(18) 0x4000000001022f50 tskhstart + 0x1e0 dw.sapD01_DVEBMGS00
(19) 0x4000000000dce3c4 DpMain + 0x484 dw.sapD01_DVEBMGS00
(20) 0x40000000022784cc nlsui_main + 0x14 dw.sapD01_DVEBMGS00
(21) 0x4000000000a39534 main + 0x14 dw.sapD01_DVEBMGS00
(22) 0xc00000000000a588 $START$ + 0xa0 /usr/lib/pa20_64/dld.sl
List of ABAP programs affected
Type Program Gen. Date Time Load Size
Prg ZVXR0303 09/29/2005 14:25:42 39936
Prg SAPMSSY0 05/01/2005 00:21:19 66560
Prg SAPMSSYD 06/05/2002 17:09:33 16384
Prg SAPFSYSCALLS 02/14/2002 14:22:47 6144
Prg RSDBRUNT 06/13/2004 00:43:20 226304
Typ RSSCR / / : m:15 5120
Prg RSDBSPBL 01/07/2003 18:47:02 59392
Prg SAPDB__S 02/14/2002 14:22:47 15360
Typ VARID 05/12/1997 16:51:30 4096
Prg %_CSYDB0 02/14/2002 14:22:46 28672
Prg RSDBSPVA 09/06/2005 22:54:22 112640
Prg SAPLSVAR 09/06/2005 22:57:28 625664
Typ VARIS 05/12/1997 15:27:21 2048
Typ RSVAMEMKEY 05/07/1997 13:07:49 2048
Prg RSDBSPMC 06/05/2002 17:09:26 66560
Typ DDSHDESCR 09/03/1997 03:05:16 3072
Typ SPPARAMS 05/07/1997 13:10:38 2048
Typ SPPARAMS 05/07/1997 13:10:38 2048
Typ RSSELINT 04/04/1995 16:12:37 2048
Prg SAPLICON 03/12/2004 06:57:52 23552
Prg %_CICON 02/14/2002 14:22:46 65536
Prg SAPLSABE 02/14/2002 14:22:47 11264
Prg SAPLSECU 05/23/2005 14:04:05 64512
Typ RSSUBINFO 10/14/1999 22:01:03 3072
Prg %_CRSDS 02/14/2002 14:22:46 8192
Typ RSDSEXPR 08/20/1998 10:57:18 2048
Prg SAPLDSYA 02/14/2002 14:22:47 39936
Prg SAPFSDS1 01/07/2003 18:32:17 47104
Typ TDCLD 11/02/1998 09:51:35 5120
Prg SAPLSDOD 04/30/2005 22:53:50 39936
Typ DOKIL 05/12/1997 16:46:17 3072
Prg SAPCNVE 02/14/2002 14:22:47 6144
Prg SAPLLANG 02/14/2002 14:22:47 8192
Typ T002 02/14/1998 10:24:58 2048
Typ RSEXFCODE 08/13/1997 12:52:57 1024
Prg SAPFSPOR 03/13/2004 19:20:44 12288
Prg SAPLOMCV 05/01/2005 00:14:10 16384
Prg CL_EXITHANDLER================CP 06/13/2004 00:40:58 26624
Prg SAPLSEXV 09/06/2005 22:55:26 107520
Prg CL_BADI_FLT_DATA_TRANS_AND_DB=CP 05/01/2005 00:21:35 33792
Typ SXS_ATTR 08/20/2001 12:23:27 4096
Typ V_EXT_ACT 11/09/2000 14:27:05 2048
Typ SXC_EXIT 11/09/2000 14:23:43 2048
Prg CL_EX_BADI_MATN1==============CP 05/01/2005 00:14:04 22528
Prg IF_EX_BADI_MATN1==============IP 06/13/2004 00:48:55 4096
Typ TMCNV 02/24/1999 03:33:25 3072
Prg SAPLSCNT 02/14/2002 14:22:47 24576
Typ DYCBOX 08/20/1998 11:16:53 2048
Prg SAPLSVSM 01/07/2003 18:35:45 22528
Prg SAPLSGUI 01/09/2003 17:15:12 31744
Prg SAPLSTTM 05/01/2005 00:24:04 75776
Prg SAPLSBDC 05/23/2005 14:05:19 38912
Prg CL_DATAPROVIDER===============CP 02/14/2002 14:22:46 40960
Prg %_CCNTL 02/14/2002 14:22:46 13312
Typ OBJ_RECORD 02/14/1998 08:30:43 2048
Prg SAPLSTUP 05/23/2005 14:03:46 65536
Prg SAPLCNDP 05/23/2005 14:05:47 167936
Prg SAPFGUICNTL 01/09/2003 17:18:52 20480
Prg SAPLOLEA 05/23/2005 14:03:56 79872
Prg SAPLSFES 09/06/2005 22:53:55 191488
Prg SAPLSPLUGIN 02/14/2002 14:22:48 6144
Typ ARFCRDATA 11/09/2000 14:04:16 6144
Prg SAPLGRFC 02/14/2002 14:22:47 13312
Typ SWCBCONT 11/15/2000 17:55:11 3072
Typ OLE_VERBS 04/04/1995 16:02:20 2048
Typ OLE_PA 04/04/1995 16:02:19 2048
Prg SAPSHDTV 03/12/2004 06:40:27 28672
Typ SSCRTEXTS 09/03/1997 03:12:33 3072
Typ SSCRFIELDS 05/13/1997 12:54:26 4096
Prg CL_GUI_PROPS_CONSUMER=========CP 01/07/2003 18:26:56 26624
Prg SAPLTHFB 09/06/2005 22:52:48 306176
Prg CL_DYNAMIC_GUI_EXTENSIONS=====CP 02/14/2002 14:22:46 33792
Prg CL_GUI_DATAMANAGER============CP 05/01/2005 00:20:36 70656
Prg CL_ABAP_CHAR_UTILITIES========CP 05/01/2005 00:14:49 11264
Prg RSDBSPVD 05/01/2005 00:15:44 73728
Typ RVARI 03/30/1998 09:40:50 4096
Typ RSVARIVDAT 04/04/1995 16:12:54 2048
Typ VBEP 01/27/2003 16:50:17 10240
Typ VBAP 09/15/2005 11:15:36 44032
Prg SAPLCEI0 09/22/2005 14:34:40 936960
Typ API_VALUE 02/20/1998 08:46:47 2048
Prg SAPLCUEV 06/07/2001 18:26:56 10240
Prg SAPLSUNI 06/13/2004 00:42:30 131072
Typ TFDIR 07/29/1998 19:49:08 3072
Prg %_CIBCO2 03/13/2004 14:32:13 12288
Typ IBINCOM 06/01/1999 11:56:27 3072
Typ IBINCONF 06/01/1999 11:56:27 2048
Typ IBSTCONF 06/01/1999 11:56:28 1024
Prg SAPLCUCB 05/23/2005 15:20:17 192512
Typ TCUIBSPECIAL 06/07/2001 17:50:37 1024
Prg %_CIBXX 03/13/2004 14:38:45 49152
Typ BAL_S_MSG 12/04/2000 13:04:01 6144
Prg CX_CBASE_ERROR================CP 01/27/2003 16:58:10 10240
Typ SCX_SRCPOS 11/09/2000 14:12:15 2048
Typ BAL_S_CONT 11/02/1998 09:43:07 2048
Typ BAL_S_PARM 12/04/2000 12:45:14 3072
Typ BAL_S_CLBK 11/02/1998 09:43:07 2048
Prg CX_STATIC_CHECK===============CP 02/14/2002 14:22:47 8192
Prg CX_ROOT=======================CP 02/14/2002 14:22:47 9216
Prg CL_CBASE======================CP 05/23/2005 15:19:44 87040
Typ T371G 04/29/1998 10:42:48 2048
Prg SAPLIBCO 03/13/2004 15:32:40 269312
Prg %_CIBCO 03/13/2004 14:38:45 11264
Prg SAPLIBXX 03/13/2004 14:38:46 11264
Prg SAPLIBIBF 03/13/2004 14:38:46 179200
Prg %_CIBIB 03/13/2004 14:38:45 18432
Prg SAPLIBINF 06/12/2004 22:20:22 415744
Prg %_CIBIN 03/13/2004 15:32:40 48128
Prg CL_IBASE_STRUC================CP 06/07/2001 19:59:10 106496
Prg %_CIBST 03/13/2004 14:38:45 37888
Prg CL_IBASE_STRUC_BUF============CP 06/07/2001 19:59:10 89088
Prg CL_IBASE_STRUC_STAT===========CP 06/07/2001 19:59:10 8192
Prg CL_IBASE_STRUC_BUF_IBSTREF====CP 06/07/2001 19:59:10 35840
Prg %_CIBCO1 03/13/2004 14:38:45 14336
Typ IBINVAL 09/18/2001 10:02:52 2048
Prg SAPLIBCU 03/13/2004 14:38:46 12288
Prg SAPLIBCUT 06/07/2001 18:27:19 12288
Typ T371B 05/14/1998 22:58:43 2048
Typ V_IBINR 03/13/2004 15:32:40 5120
Typ V_IBINR_CM 03/13/2004 15:32:40 5120
Prg CL_IBASE_SERVICE==============CP 06/07/2001 19:59:10 13312
Prg CL_IBASE_T371D_BUF============CP 06/07/2001 19:59:10 12288
Typ T371D 08/27/1999 18:19:44 2048
Prg CL_IBASE_R3_MATERIAL==========CP 05/23/2005 15:08:24 59392
Typ MARA 05/23/2005 15:08:18 22528
Typ MAKT 08/28/1997 08:52:19 2048
Typ ICON 01/03/1996 15:34:02 3072
Prg CL_ABAP_TYPEDESCR=============CP 05/01/2005 00:20:10 21504
Prg CL_ABAP_ELEMDESCR=============CP 05/01/2005 00:20:33 20480
Prg CL_ABAP_DATADESCR=============CP 03/12/2004 07:16:33 14336
Prg CL_ABAP_REFDESCR==============CP 03/12/2004 07:17:23 16384
Prg CL_ABAP_STRUCTDESCR===========CP 05/01/2005 00:20:33 20480
Prg CL_ABAP_COMPLEXDESCR==========CP 03/12/2004 07:16:33 13312
Prg CL_ABAP_TABLEDESCR============CP 03/12/2004 07:17:23 17408
Prg CL_ABAP_CLASSDESCR============CP 03/12/2004 07:17:23 23552
Prg CL_ABAP_OBJECTDESCR===========CP 03/12/2004 07:17:23 25600
Prg CL_ABAP_INTFDESCR=============CP 03/12/2004 07:16:33 19456
Prg CL_ABAP_SOFT_REFERENCE========CP 03/29/2001 16:42:12 7168
Prg CL_ABAP_REFERENCE=============CP 02/14/2002 14:22:46 6144
Prg IF_EX_CM_BADI_VERSION=========IP 01/07/2002 16:09:04 3072
Prg %_CABAP 01/07/2003 18:31:23 23552
Typ SXS_INTER 11/30/1998 15:55:16 2048
Prg CL_EX_CM_BADI_VERSION=========CP 05/01/2005 00:14:04 13312
Prg %_CSXRT 06/13/2004 00:40:55 11264
Prg CL_EXIT_MASTER================CP 06/13/2004 00:40:58 13312
Typ V_EXT_IMP 11/09/2000 14:27:05 2048
Typ V_EXT_IMP 11/09/2000 14:27:05 2048
Typ SXC_IMPSWH 11/09/2000 14:23:44 2048
Prg CL_IM_CM_BADI_VERSION_DEF=====CP 04/17/2002 11:01:00 6144
Prg SAPLASTAT_TRIG 02/14/2002 14:22:47 11264
Typ ASTAT_TYP2 11/10/1998 05:35:18 2048
Prg IF_CM_BASELINE================IP 05/23/2005 15:08:24 9216
Prg IF_IBASE_IBOF_TREE_OBJECT=====IP 05/23/2005 15:08:24 5120
Prg IF_IBASE_INSTALL==============IP 06/07/2001 20:08:54 4096
Prg IF_IBASE_MATERIAL=============IP 06/07/2001 20:08:54 3072
Prg IF_IBASE_OBJECT===============IP 06/07/2001 20:08:54 4096
Prg SAPLBOMA 02/14/2002 14:15:40 10240
Typ IONRA 03/12/2004 02:09:40 23552
Typ IBIBCOM 08/30/2001 17:56:57 4096
Typ IBIB 03/13/2004 14:32:13 5120
Prg CL_IBASE_STRUC_SERVICE========CP 06/07/2001 19:59:10 17408
Prg CL_CU_CBASE_ENQUEUE_CORE======CP 06/07/2001 19:58:59 11264
Prg CL_CU_CBASE_ENQUEUE===========CP 06/07/2001 19:58:59 16384
Typ T371F 06/01/1999 12:00:49 2048
Typ V_IBIN_SYVAL 03/13/2004 15:32:41 4096
Typ IBIN 09/18/2001 10:02:52 6144
Typ IBINOWN 02/01/2000 14:56:07 2048
Prg CL_IBASE_T371F_BUF============CP 06/07/2001 19:59:11 8192
Prg CL_IBASE_STRUC_FILT_02========CP 06/07/2001 19:59:10 11264
Prg CL_IBASE_STRUC_FILT===========CP 06/07/2001 19:59:10 10240
Typ IBST 09/18/2001 10:02:52 4096
Typ IBST 09/18/2001 10:02:52 4096
Typ IBSTREF 04/15/1998 00:20:43 2048
Typ IBSTREF 04/15/1998 00:20:43 2048
Prg IF_CBASE_E====================IP 06/07/2001 20:08:25 3072
Prg %_CCXTAB 02/14/2002 14:22:46 6144
Prg SAPLCUCQ 09/15/2005 11:15:38 79872
Typ CUCO 09/18/2001 10:02:34 18432
Typ CUCO_OBJ 09/18/2001 10:02:34 18432
Prg SAPLCLCA 09/06/2005 23:33:29 68608
Typ TCLA 03/13/2004 14:10:20 5120
Typ TCLAO 08/13/1997 13:57:22 4096
Prg SAPLCUOB 05/23/2005 14:31:35 31744
Typ INOB 09/03/1997 03:20:02 4096
Prg SAPLCLSE 05/23/2005 14:32:26 167936
Prg %_CCC01 05/01/2005 00:34:57 53248
Typ TABLEKEY 07/06/1998 21:01:06 2048
Typ KSSK 09/18/2001 10:02:58 3072
Prg SAPLCLEF -
Report for Material Numbers configured in KMAT Sales Order
Hi,
Scenario:
We are operating with KMAT material type. (e.g. ABC)
Material "ABC" has Characterstic Char 1 , Char2, Char3, Char 4
Each Char has Char values.
Sales Persons create the Sales orders by selecting approprite Char & Char Values. Via MRP, this lead to requirement generation for materials associated to the respective Char & Char Values.
Requirement:
For a given list of sales order numbers for the KMAT material (ABC),
I want to get the list of Material numbers associated to the Char & Char Values configured in these S.Os.
Thanks
NitinFor the Function Modules, you would need to go to Transaction SE37. For CS_BOM_EXPLOSION I use the following Paramater Values, aukmng = 1, auskz = X, capid = PP01, CUOBJ = from the VBAP Table and line Item of the Sales Document VBAP-cuobj, datuv = current date, emeng = 1, mktls = X, mtnrv = VBAP-matnr, stpst = 0, svwvo = X, werks = VBAP-werks, vbeln = VBAP-vbeln, vbpos = VBAK-posnr, vrsvo = X.
For the Function Module VC_I_GET_CONFIGURATION use the following Parameter Value, instance = VBAP-cuobj. -
To avoid the attachment for the body content while sending email from ABAP
SAP Version : 4.7
When i tried to send an external email from the abap report program, the body content of the mail is coming as an attachment for the same. I need to avoid this. Please give the suggestion. Am attaching the code.
DECLARATION PART *
TYPE-POOLS : SLIS.
TABLES : VBAK.
DECLARATION FOR ALV.
DATA : F_FIELD TYPE SLIS_T_FIELDCAT_ALV,
W_FIELD TYPE SLIS_FIELDCAT_ALV,
L_HEADER TYPE SLIS_T_LISTHEADER,
W_HEADER TYPE SLIS_LISTHEADER,
W_LAYOUT TYPE SLIS_LAYOUT_ALV,
t_sort type slis_t_sortinfo_alv,
w_sort type slis_sortinfo_alv.
TYPES : BEGIN OF T_VBAK,
VBELN LIKE VBAK-VBELN,
VKGRP LIKE VBAK-VKGRP,
KUNNR LIKE VBAK-KUNNR,
ERDAT LIKE VBAK-ERDAT,
VTWEG LIKE VBAK-VTWEG,
LIFSK LIKE VBAK-LIFSK,
VKBUR LIKE VBAK-VKBUR,
END OF T_VBAK.
TYPES : BEGIN OF T_VBAP,
VBELN LIKE VBAP-VBELN,
POSNR LIKE VBAP-POSNR,
MATNR LIKE VBAP-MATNR,
WERKS LIKE VBAP-WERKS,
ARKTX LIKE VBAP-ARKTX,
KWMENG LIKE VBAP-KWMENG,
CUOBJ LIKE VBAP-CUOBJ,
NETWR LIKE VBAP-NETWR,
ZSCHL_K LIKE VBAP-ZSCHL_K,
KONDM LIKE VBAP-KONDM,
ZZURWN LIKE VBAP-ZZURWN,
END OF T_VBAP.
TYPES : BEGIN OF T_LIPS,
VBELN LIKE LIPS-VBELN,
POSNR LIKE LIPS-POSNR,
VGBEL LIKE LIPS-VGBEL,
VGPOS LIKE LIPS-VGPOS,
END OF T_LIPS.
TYPES : BEGIN OF T_KNA1,
KUNNR LIKE KNA1-KUNNR,
NAME1 LIKE KNA1-NAME1,
ADRNR LIKE KNA1-ADRNR,
END OF T_KNA1.
TYPES : BEGIN OF T_VBKD,
VBELN LIKE VBKD-VBELN,
POSNR LIKE VBKD-POSNR,
BSTKD LIKE VBKD-BSTKD,
BSTDK LIKE VBKD-BSTDK,
KURSK LIKE VBKD-KURSK, " CURRENCY CHECK
BZIRK LIKE VBKD-BZIRK, " SALES DISTRICT
KDGRP LIKE VBKD-KDGRP,
IHREZ LIKE VBKD-IHREZ,
END OF T_VBKD.
TYPES : BEGIN OF T_LIKP,
VBELN LIKE LIKP-VBELN,
ERDAT LIKE LIKP-ERDAT,
END OF T_LIKP.
TYPES : BEGIN OF T_ADR6,
ADDRNUMBER LIKE ADR6-ADDRNUMBER,
SMTP_ADDR LIKE ADR6-SMTP_ADDR,
END OF T_ADR6.
DATA : BEGIN OF IT_CUST OCCURS 0,
KUNNR LIKE VBAK-KUNNR,
END OF IT_CUST.
TYPES : BEGIN OF T_VBUP,
VBELN LIKE VBUP-VBELN,
POSNR LIKE VBUP-POSNR,
KOSTA LIKE VBUP-KOSTA,
WBSTA LIKE VBUP-WBSTA,
END OF T_VBUP.
TYPES : BEGIN OF T_TVLST,
LIFSP LIKE TVLST-LIFSP,
VTEXT LIKE TVLST-VTEXT,
END OF T_TVLST.
TYPES : BEGIN OF T_CONFIG.
INCLUDE STRUCTURE CONF_OUT.
TYPES : END OF T_CONFIG.
DATA : TMP LIKE VBAK-KUNNR.
DATA : NAME_TEXT LIKE THEAD-TDNAME.
DATA : TLINE1 LIKE TLINE OCCURS 0 WITH HEADER LINE.
DATA : TMP_BRAKET LIKE CONF_OUT-ATWRT,
TMP_BRAKET1 LIKE CONF_OUT-ATWRT.
DATA : BEGIN OF IT_FINAL OCCURS 0,
WERKS LIKE VBAP-WERKS,
VBELN LIKE VBAP-VBELN,
POSNR LIKE VBAP-POSNR,
KUNNR LIKE VBAK-KUNNR,
NAME1 LIKE KNA1-NAME1,
VBELN1 LIKE LIKP-VBELN,
ERDAT LIKE LIKP-ERDAT,
LIFSK LIKE VBAK-LIFSK,
ZZURWN LIKE VBAP-ZZURWN,
IHREZ LIKE VBKD-IHREZ,
ERDAT1 LIKE VBAK-ERDAT,
NETWR(25) type C,
BSTKD LIKE VBKD-BSTKD,
BSTDK LIKE VBKD-BSTDK,
SALORD(17) TYPE C,
PUMP_TYPE LIKE CONF_OUT-ATWRT,
PUMP_SIZE LIKE CONF_OUT-ATWRT,
VTEXT LIKE TVLST-VTEXT,
KWMENG(25) TYPE C,
FOOTER(330) TYPE C,
ITMTXT(330) TYPE C,
END OF IT_FINAL.
DATA : IT_VBAK TYPE STANDARD TABLE OF T_VBAK,
IT_VBAP TYPE STANDARD TABLE OF T_VBAP,
IT_VBKD TYPE STANDARD TABLE OF T_VBKD,
IT_LIKP TYPE STANDARD TABLE OF T_LIKP,
IT_LIPS TYPE STANDARD TABLE OF T_LIPS,
IT_VBUP TYPE STANDARD TABLE OF T_VBUP,
IT_KNA1 TYPE STANDARD TABLE OF T_KNA1,
IT_ADR6 TYPE STANDARD TABLE OF T_ADR6,
IT_FINAL1 LIKE IT_FINAL OCCURS 0 with header line,
IT_TVLST TYPE STANDARD TABLE OF T_TVLST,
IT_CONFIG TYPE STANDARD TABLE OF T_CONFIG,
W_VBAK TYPE T_VBAK,
W_VBAP TYPE T_VBAP,
W_VBKD TYPE T_VBKD,
W_LIKP TYPE T_LIKP,
W_ADR6 TYPE T_ADR6,
W_LIPS TYPE T_LIPS,
W_VBUP TYPE T_VBUP,
W_KNA1 TYPE T_KNA1,
W_TVLST TYPE T_TVLST,
W_CONFIG TYPE T_CONFIG.
DATA: it_message TYPE STANDARD TABLE OF solisti1 INITIAL SIZE 0
WITH HEADER LINE.
DATA: it_attach TYPE STANDARD TABLE OF solisti1 INITIAL SIZE 0
WITH HEADER LINE.
DATA: t_packing_list LIKE sopcklsti1 OCCURS 0 WITH HEADER LINE,
t_contents LIKE solisti1 OCCURS 0 WITH HEADER LINE,
t_receivers LIKE somlreci1 OCCURS 0 WITH HEADER LINE,
t_attachment LIKE solisti1 OCCURS 0 WITH HEADER LINE,
t_object_header LIKE solisti1 OCCURS 0 WITH HEADER LINE,
w_cnt TYPE i,
w_sent_all(1) TYPE c,
w_doc_data LIKE sodocchgi1,
gd_error TYPE sy-subrc,
gd_reciever TYPE sy-subrc.
SELECTION-CRITERIA *
SELECTION-SCREEN BEGIN OF BLOCK B1 WITH FRAME TITLE TEXT-001.
PARAMETERS : R2 RADIOBUTTON GROUP G1 USER-COMMAND radio DEFAULT 'X',
R1 RADIOBUTTON GROUP G1 .
selection-screen end of block b1.
selection-screen begin of block b2 with frame title text-002.
PARAMETERS: p_email TYPE somlreci1-receiver
DEFAULT '[email protected]'.
PARAMETERS : P_VTWEG LIKE W_VBAK-VTWEG ,
P_WERKS LIKE W_VBAP-WERKS.
select-options : s_vkgrp for w_vbak-vkgrp,
s_ERDAT for w_LIKP-ERDAT.
selection-screen end of block b2.
Initialization
INITIALIZATION.
s_vkgrp-sign = 'I'.
s_vkgrp-option = 'BT'.
s_vkgrp-low = '313'.
s_vkgrp-high = '324'.
APPEND s_vkgrp.
s_erdat-sign = 'I'.
s_erdat-option = 'BT'.
s_erdat-low = '20080108'.
s_erdat-high = '20080108'.
s_erdat-low = '20070101'.
s_erdat-high = sy-datum.
APPEND s_erdat.
selection-screen validations
AT SELECTION-SCREEN.
Validation for Plant.
IF p_werks NE '7210'.
MESSAGE : 'Plant entered should be 7210' TYPE 'E'.
ENDIF.
START OF SELECTION *
start-of-selection.
GETTING THE DATA FROM THE DATABASE TABLE
PERFORM DATA_FETCH.
FILLING THE FINAL INTERNAL TABLE
PERFORM FILL_FINAL.
GETTING THE LIST FOR SENDING MAIL OR DISPLAY.
IF R1 = 'X'.
Populate table with details to be entered into .xls file
LOOP AT IT_CUST.
PERFORM build_xls_data_table using it_cust-kunnr.
ENDLOOP.
Instructs mail send program for SAPCONNECT to send email(rsconn01)
PERFORM initiate_mail_execute_program.
ELSEIF R2 = 'X'.
PERFORM LIST_DISPLAY.
ENDIF.
END OF SELECTION *
end-of-selection.
*& Form DATA_FETCH
text
--> p1 text
<-- p2 text
FORM DATA_FETCH .
SELECT VBELN
VKGRP
KUNNR
ERDAT
VTWEG
LIFSK
VKBUR
INTO TABLE IT_VBAK
FROM VBAK
WHERE VTWEG = P_VTWEG
AND VKGRP IN S_VKGRP
AND LIFSK NE ''.
IF IT_VBAK[] IS NOT INITIAL.
SELECT LIFSP
VTEXT
INTO TABLE IT_TVLST
FROM TVLST
FOR ALL ENTRIES IN IT_VBAK
WHERE LIFSP = IT_VBAK-LIFSK
AND SPRAS = 'EN'.
SELECT VBELN
POSNR
MATNR
WERKS
ARKTX
KWMENG
CUOBJ
NETWR
ZSCHL_K
KONDM
ZZURWN
INTO TABLE IT_VBAP
FROM VBAP
FOR ALL ENTRIES IN IT_VBAK
WHERE VBELN = IT_VBAK-VBELN
AND WERKS = P_WERKS.
SELECT KUNNR
NAME1
ADRNR
INTO TABLE IT_KNA1
FROM KNA1
FOR ALL ENTRIES IN IT_VBAK
WHERE KUNNR = IT_VBAK-KUNNR.
SELECT VBELN
POSNR
BSTKD
BSTDK
KURSK
BZIRK
KDGRP
INTO TABLE IT_VBKD
FROM VBKD
FOR ALL ENTRIES IN IT_VBAK
WHERE VBELN = IT_VBAK-VBELN.
ENDIF.
IF IT_VBAP[] IS NOT INITIAL.
SELECT VBELN
POSNR
VGBEL
VGPOS
INTO TABLE IT_LIPS
FROM LIPS
FOR ALL ENTRIES IN IT_VBAP
WHERE VGBEL = IT_VBAP-VBELN
AND VGPOS = IT_VBAP-POSNR.
ENDIF.
IF IT_LIPS[] IS NOT INITIAL.
SELECT VBELN
ERDAT
INTO TABLE IT_LIKP
FROM LIKP
FOR ALL ENTRIES IN IT_LIPS
WHERE VBELN = IT_LIPS-VBELN
AND ERDAT IN S_ERDAT.
SELECT VBELN
POSNR
KOSTA
WBSTA
INTO TABLE IT_VBUP
FROM VBUP
FOR ALL ENTRIES IN IT_LIPS
WHERE VBELN = IT_LIPS-VBELN
AND POSNR = IT_LIPS-POSNR
AND KOSTA EQ 'C'
AND WBSTA NE 'C'.
ENDIF.
IF IT_KNA1[] IS NOT INITIAL.
SELECT ADDRNUMBER
SMTP_ADDR
INTO TABLE IT_ADR6
FROM ADR6
FOR ALL ENTRIES IN IT_KNA1
WHERE ADDRNUMBER = IT_KNA1-ADRNR.
ENDIF.
ENDFORM. " DATA_FETCH
*& Form LIST_DISPLAY
text
--> p1 text
<-- p2 text
FORM LIST_DISPLAY .
REFRESH F_FIELD.
IF R2 = 'X'.
W_FIELD-col_pos = 1.
W_FIELD-fieldname = 'WERKS'.
W_FIELD-tabname = 'IT_FINAL'.
W_FIELD-emphasize = 'C410'.
W_FIELD-seltext_m = 'Plant'.
APPEND W_FIELD TO F_FIELD.
CLEAR W_FIELD.
W_FIELD-col_pos = 2.
W_FIELD-fieldname = 'VBELN'.
W_FIELD-tabname = 'IT_FINAL'.
W_FIELD-emphasize = 'C410'.
W_FIELD-seltext_m = 'Sales Order'.
APPEND W_FIELD TO F_FIELD.
CLEAR W_FIELD.
W_FIELD-col_pos = 3.
W_FIELD-fieldname = 'KUNNR'.
W_FIELD-tabname = 'IT_FINAL'.
W_FIELD-emphasize = 'C410'.
W_FIELD-seltext_m = 'Customer Code'.
APPEND W_FIELD TO F_FIELD.
CLEAR W_FIELD.
W_FIELD-col_pos = 4.
W_FIELD-fieldname = 'NAME1'.
W_FIELD-tabname = 'IT_FINAL'.
W_FIELD-emphasize = 'C410'.
W_FIELD-seltext_m = 'Customer Name'.
APPEND W_FIELD TO F_FIELD.
CLEAR W_FIELD.
W_FIELD-col_pos = 5.
W_FIELD-fieldname = 'VBELN1'.
W_FIELD-tabname = 'IT_FINAL'.
W_FIELD-emphasize = 'C410'.
W_FIELD-seltext_m = 'Delivery Number'.
APPEND W_FIELD TO F_FIELD.
CLEAR W_FIELD.
W_FIELD-col_pos = 6.
W_FIELD-fieldname = 'ERDAT'.
W_FIELD-tabname = 'IT_FINAL'.
W_FIELD-emphasize = 'C410'.
W_FIELD-seltext_m = 'Delivery Date'.
APPEND W_FIELD TO F_FIELD.
CLEAR W_FIELD.
W_FIELD-col_pos = 7.
W_FIELD-fieldname = 'LIFSK'.
W_FIELD-tabname = 'IT_FINAL'.
W_FIELD-emphasize = 'C410'.
W_FIELD-seltext_m = 'Delivery Block'.
APPEND W_FIELD TO F_FIELD.
CLEAR W_FIELD.
W_FIELD-col_pos = 8.
W_FIELD-fieldname = 'PUMP_TYPE'.
W_FIELD-tabname = 'IT_FINAL'.
W_FIELD-emphasize = 'C410'.
W_FIELD-seltext_m = 'Pump Type'.
APPEND W_FIELD TO F_FIELD.
CLEAR W_FIELD.
W_FIELD-col_pos = 9.
W_FIELD-fieldname = 'PUMP_SIZE'.
W_FIELD-tabname = 'IT_FINAL'.
W_FIELD-emphasize = 'C410'.
W_FIELD-seltext_l = 'Pump Size'.
APPEND W_FIELD TO F_FIELD.
CLEAR W_FIELD.
W_FIELD-col_pos = 10.
W_FIELD-fieldname = 'ZZURWN'.
W_FIELD-tabname = 'IT_FINAL'.
W_FIELD-emphasize = 'C410'.
W_FIELD-seltext_m = 'Pump Srno'.
APPEND W_FIELD TO F_FIELD.
CLEAR W_FIELD.
W_FIELD-col_pos = 11.
W_FIELD-fieldname = 'IHREZ'.
W_FIELD-tabname = 'IT_FINAL'.
W_FIELD-emphasize = 'C410'.
W_FIELD-seltext_m = 'Indent No.'.
APPEND W_FIELD TO F_FIELD.
CLEAR W_FIELD.
W_FIELD-col_pos = 12.
W_FIELD-fieldname = 'ERDAT'.
W_FIELD-tabname = 'IT_FINAL'.
W_FIELD-emphasize = 'C410'.
W_FIELD-seltext_m = 'Order Booking Dt'.
APPEND W_FIELD TO F_FIELD.
CLEAR W_FIELD.
W_FIELD-col_pos = 13.
W_FIELD-fieldname = 'NETWR'.
W_FIELD-tabname = 'IT_FINAL'.
W_FIELD-emphasize = 'C710'.
W_FIELD-seltext_m = 'Net Value'.
w_field-do_sum = 'X'.
APPEND W_FIELD TO F_FIELD.
CLEAR W_FIELD.
W_FIELD-col_pos = 14.
W_FIELD-fieldname = 'KWMENG'.
W_FIELD-tabname = 'IT_FINAL'.
W_FIELD-emphasize = 'C710'.
W_FIELD-seltext_m = 'Qty'.
w_field-do_sum = 'X'.
APPEND W_FIELD TO F_FIELD.
CLEAR W_FIELD.
W_FIELD-col_pos = 15.
W_FIELD-fieldname = 'BSTKD'.
W_FIELD-tabname = 'IT_FINAL'.
W_FIELD-emphasize = 'C410'.
W_FIELD-seltext_m = 'Customer PONO'.
APPEND W_FIELD TO F_FIELD.
CLEAR W_FIELD.
W_FIELD-col_pos = 16.
W_FIELD-fieldname = 'BSTDK'.
W_FIELD-tabname = 'IT_FINAL'.
W_FIELD-emphasize = 'C410'.
W_FIELD-seltext_m = 'Customer PODT'.
APPEND W_FIELD TO F_FIELD.
CLEAR W_FIELD.
W_FIELD-col_pos = 17.
W_FIELD-fieldname = 'SALORD'.
W_FIELD-tabname = 'IT_FINAL'.
W_FIELD-emphasize = 'C410'.
W_FIELD-seltext_m = 'Sales Order/Item'.
APPEND W_FIELD TO F_FIELD.
CLEAR W_FIELD.
W_FIELD-col_pos = 18.
W_FIELD-fieldname = 'VTEXT'.
W_FIELD-tabname = 'IT_FINAL'.
W_FIELD-emphasize = 'C410'.
W_FIELD-seltext_m = 'Delivery Block Desc.'.
APPEND W_FIELD TO F_FIELD.
CLEAR W_FIELD.
W_FIELD-col_pos = 19.
W_FIELD-fieldname = 'FOOTER'.
W_FIELD-tabname = 'IT_FINAL'.
W_FIELD-emphasize = 'C410'.
W_FIELD-seltext_m = 'Footer Text'.
APPEND W_FIELD TO F_FIELD.
CLEAR W_FIELD.
W_FIELD-col_pos = 20.
W_FIELD-fieldname = 'ITMTXT'.
W_FIELD-tabname = 'IT_FINAL'.
W_FIELD-emphasize = 'C410'.
W_FIELD-seltext_m = 'Item Text'.
APPEND W_FIELD TO F_FIELD.
CLEAR W_FIELD.
PERFORM SORT_FIELD.
PERFORM LAYOUT_DISPLAY.
PERFORM GRID_DISPLAY.
ENDIF.
ENDFORM. " LIST_DISPLAY
*& Form FILL_FINAL
text
--> p1 text
<-- p2 text
FORM FILL_FINAL .
REFRESH IT_FINAL.
LOOP AT IT_VBUP INTO W_VBUP.
READ TABLE IT_LIPS INTO W_LIPS WITH KEY VBELN = W_VBUP-VBELN POSNR = W_VBUP-POSNR.
READ TABLE IT_LIKP INTO W_LIKP WITH KEY VBELN = W_LIPS-VBELN.
IF SY-SUBRC EQ 0.
READ TABLE IT_VBAP INTO W_VBAP WITH KEY VBELN = W_LIPS-VGBEL POSNR = W_LIPS-VGPOS.
READ TABLE IT_VBAK INTO W_VBAK WITH KEY VBELN = W_VBAP-VBELN.
READ TABLE IT_VBKD INTO W_VBKD WITH KEY VBELN = W_VBAK-VBELN.
READ TABLE IT_KNA1 INTO W_KNA1 WITH KEY KUNNR = W_VBAK-KUNNR.
READ TABLE IT_TVLST INTO W_TVLST WITH KEY LIFSP = W_VBAK-LIFSK.
IT_FINAL-WERKS = W_VBAP-WERKS.
IT_FINAL-VBELN = W_VBAP-VBELN.
IT_FINAL-KUNNR = W_VBAK-KUNNR.
IT_FINAL-NAME1 = W_KNA1-NAME1.
IT_FINAL-VBELN1 = W_LIKP-VBELN.
IT_FINAL-ERDAT = W_LIKP-ERDAT.
IT_FINAL-LIFSK = W_VBAK-LIFSK.
IT_FINAL-ZZURWN = W_VBAP-ZZURWN.
IT_FINAL-IHREZ = W_VBKD-IHREZ.
IT_FINAL-ERDAT1 = W_VBAK-ERDAT.
IT_FINAL-NETWR = W_VBAP-NETWR.
IT_FINAL-BSTKD = W_VBKD-BSTKD.
IT_FINAL-BSTDK = W_VBKD-BSTDK.
IT_FINAL-POSNR = W_VBAP-POSNR.
IT_FINAL-VTEXT = W_TVLST-VTEXT.
IT_FINAL-KWMENG = W_VBAP-KWMENG.
CONCATENATE W_VBAP-VBELN W_VBAP-POSNR INTO IT_FINAL-SALORD SEPARATED BY '/'.
IF W_VBAP-CUOBJ NE '000000000000000000'.
REFRESH IT_CONFIG.
CALL FUNCTION 'VC_I_GET_CONFIGURATION'
EXPORTING
INSTANCE = W_VBAP-CUOBJ
LANGUAGE = SY-LANGU
TABLES
CONFIGURATION = IT_CONFIG
EXCEPTIONS
INSTANCE_NOT_FOUND = 1
INTERNAL_ERROR = 2
NO_CLASS_ALLOCATION = 3
INSTANCE_NOT_VALID = 4
OTHERS = 5.
IF SY-SUBRC = 0.
READ TABLE IT_CONFIG INTO W_CONFIG WITH KEY ATNAM = 'IN_PUMP_TYPE'.
IT_FINAL-PUMP_TYPE = W_CONFIG-ATWRT.
CLEAR W_CONFIG.
READ TABLE IT_CONFIG INTO W_CONFIG WITH KEY ATNAM = 'IN_PUMP_SIZE' .
IT_FINAL-PUMP_SIZE = W_CONFIG-ATWRT.
CLEAR W_CONFIG.
ENDIF.
ENDIF.
move w_vbap-vbeln to name_text.
CALL FUNCTION 'READ_TEXT'
EXPORTING
id = 'ZKT1'
language = 'E'
name = name_text
object = 'VBBK'
TABLES
lines = tline1
EXCEPTIONS
OTHERS = 8.
LOOP AT TLINE1.
CONCATENATE IT_FINAL-FOOTER TLINE1-TDLINE+0(65) INTO IT_FINAL-FOOTER.
CLEAR : TLINE1.
ENDLOOP.
clear : name_text,tline1[].
concatenate w_vbap-vbeln w_vbap-posnr into name_text.
CALL FUNCTION 'READ_TEXT'
EXPORTING
id = 'ZKT3'
language = 'E'
name = name_text
object = 'VBBP'
TABLES
lines = tline1
EXCEPTIONS
OTHERS = 8.
LOOP AT TLINE1.
CONCATENATE IT_FINAL-ITMTXT TLINE1-TDLINE+0(65) INTO IT_FINAL-ITMTXT.
CLEAR : TLINE1.
ENDLOOP.
APPEND IT_FINAL.
ENDIF.
CLEAR : IT_FINAL,W_VBAP,W_VBKD,W_VBUP,W_LIPS,W_LIKP,W_KNA1,W_VBAK,W_TVLST,name_text,tline1[].
ENDLOOP.
IT_FINAL1[] = IT_FINAL[].
SORT IT_FINAL1 BY KUNNR.
LOOP AT IT_FINAL1.
IF TMP NE IT_FINAL1-KUNNR.
IT_CUST-KUNNR = IT_FINAL1-KUNNR.
APPEND IT_CUST.
clear : tmp,it_cust.
TMP = IT_FINAL1-KUNNR.
ENDIF.
CLEAR : IT_FINAL1.
ENDLOOP.
ENDFORM. " FILL_FINAL
*& Form LAYOUT_DISPLAY
text
--> p1 text
<-- p2 text
FORM LAYOUT_DISPLAY .
W_LAYOUT-colwidth_optimize = 'X'.
ENDFORM. " LAYOUT_DISPLAY
*& Form GRID_DISPLAY
text
--> p1 text
<-- p2 text
FORM GRID_DISPLAY .
CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
EXPORTING
I_INTERFACE_CHECK = ' '
I_BYPASSING_BUFFER = ' '
I_BUFFER_ACTIVE = ' '
I_CALLBACK_PROGRAM = SY-REPID
I_CALLBACK_PF_STATUS_SET = ' '
I_CALLBACK_USER_COMMAND = ' '
I_CALLBACK_TOP_OF_PAGE = 'TOP_OF_PAGE'
I_CALLBACK_HTML_TOP_OF_PAGE = ' '
I_CALLBACK_HTML_END_OF_LIST = ' '
I_STRUCTURE_NAME =
I_BACKGROUND_ID = ' '
I_GRID_TITLE =
I_GRID_SETTINGS =
IS_LAYOUT = W_LAYOUT
IT_FIELDCAT = F_FIELD
IT_EXCLUDING =
IT_SPECIAL_GROUPS =
IT_SORT = T_SORT
IT_FILTER =
IS_SEL_HIDE =
I_DEFAULT = 'X'
I_SAVE = ' '
IS_VARIANT =
IT_EVENTS =
IT_EVENT_EXIT =
IS_PRINT =
IS_REPREP_ID =
I_SCREEN_START_COLUMN = 0
I_SCREEN_START_LINE = 0
I_SCREEN_END_COLUMN = 0
I_SCREEN_END_LINE = 0
IT_ALV_GRAPHICS =
IT_HYPERLINK =
IT_ADD_FIELDCAT =
IT_EXCEPT_QINFO =
I_HTML_HEIGHT_TOP =
I_HTML_HEIGHT_END =
IMPORTING
E_EXIT_CAUSED_BY_CALLER =
ES_EXIT_CAUSED_BY_USER =
TABLES
T_OUTTAB = IT_FINAL
EXCEPTIONS
PROGRAM_ERROR = 1
OTHERS = 2
IF SY-SUBRC <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
ENDFORM. " GRID_DISPLAY
*& Form SORT_FIELD
text
--> p1 text
<-- p2 text
FORM SORT_FIELD .
w_sort-spos = 1.
w_sort-fieldname = 'KUNNR'.
w_sort-up = 'X'.
append w_sort to t_sort.
clear w_sort.
w_sort-spos = 2.
w_sort-fieldname = 'VBELN'.
w_sort-up = 'X'.
append w_sort to t_sort.
clear w_sort.
ENDFORM. " SORT_FIELD
*& Form TOP_OF_PAGE
text
FORM top_of_page.
IF R2 = 'X'.
REFRESH l_header.
w_header-typ = 'S'.
w_header-key = 'Delivery Block : '.
w_header-info = 'Outbound delivery created but not despatched'.
APPEND w_header TO l_header.
CLEAR w_header.
CALL FUNCTION 'REUSE_ALV_COMMENTARY_WRITE'
EXPORTING
it_list_commentary = l_header.
ENDIF.
ENDFORM. "TOP_OF_PAGE
*& Form BUILD_XLS_DATA_TABLE
Build data table for .xls document
FORM build_xls_data_table using custcode.
CONSTANTS: con_cret TYPE X VALUE '0D', "OK for non Unicode
con_tab TYPE x VALUE '09'. "OK for non Unicode
data : it_custcode like vbak-kunnr.
*If you have Unicode check active in program attributes thnen you will
*need to declare constants as follows
*class cl_abap_char_utilities definition load.
constants:
con_tab type c value cl_abap_char_utilities=>HORIZONTAL_TAB,
con_cret type c value cl_abap_char_utilities=>CR_LF.
clear : it_attach,it_attach[].
CONCATENATE 'Customer PONO' 'Customer PODT' 'Sales Order No' 'Item No'
'Pump Type' 'Pump Size' 'Order Value Rs' 'Delivery No.' 'Delivery Dt.'
'Quantity' 'Reasons for not getting Despatch'
INTO it_attach SEPARATED BY con_tab.
CONCATENATE con_cret it_attach INTO it_attach.
APPEND it_attach.
it_custcode = custcode.
CLEAR : W_KNA1,W_ADR6. "Code need to be added once testing is over.
READ TABLE IT_KNA1 INTO W_KNA1 WITH KEY KUNNR = IT_CUSTCODE.
READ TABLE IT_ADR6 INTO W_ADR6 WITH KEY ADDRNUMBER = W_KNA1-ADRNR.
P_EMAIL = W_ADR6-SMTP_ADDR.
LOOP AT it_final where kunnr = it_custcode.
CONCATENATE
IT_FINAL-BSTKD
IT_FINAL-BSTDK
IT_FINAL-VBELN
IT_FINAL-POSNR
IT_FINAL-PUMP_TYPE
IT_FINAL-PUMP_SIZE
IT_FINAL-NETWR
IT_FINAL-VBELN1
IT_FINAL-ERDAT
IT_FINAL-KWMENG
IT_FINAL-VTEXT
INTO it_attach SEPARATED BY con_tab.
CONCATENATE con_cret it_attach INTO it_attach.
APPEND it_attach.
clear it_final.
ENDLOOP.
if R1 = 'X'.
Populate message body text
perform populate_email_message_body.
Send file by email as .xls speadsheet
PERFORM send_file_as_email_attachment
tables it_message
it_attach
using p_email
'AWAITING DESPATCH CLEARANCE'
'XLS'
'Delivery_Block'
'Delivery_Blk'
'[email protected]'
'INT'
changing gd_error
gd_reciever.
endif.
ENDFORM. " BUILD_XLS_DATA_TABLE
*& Form SEND_FILE_AS_EMAIL_ATTACHMENT
Send email
FORM send_file_as_email_attachment tables pit_message
pit_attach
using p_email
p_mtitle
p_format
p_filename
p_attdescription
p_sender_address
p_sender_addres_type
changing p_error
p_reciever.
DATA: objhead LIKE solisti1 OCCURS 1 WITH HEADER LINE.
DATA: ld_error TYPE sy-subrc,
ld_reciever TYPE sy-subrc,
ld_mtitle LIKE sodocchgi1-obj_descr,
ld_email LIKE somlreci1-receiver,
ld_format TYPE so_obj_tp ,
ld_attdescription TYPE so_obj_nam ,
ld_attfilename TYPE so_obj_des ,
ld_sender_address LIKE soextreci1-receiver,
ld_sender_address_type LIKE soextreci1-adr_typ,
ld_receiver LIKE sy-subrc.
ld_email = p_email.
ld_mtitle = p_mtitle.
ld_format = p_format.
ld_attdescription = p_attdescription.
ld_attfilename = p_filename.
ld_sender_address = p_sender_address.
ld_sender_address_type = p_sender_addres_type.
Fill the document data.
w_doc_data-doc_size = 1.
Populate the subject/generic message attributes
w_doc_data-obj_langu = sy-langu.
w_doc_data-obj_name = 'SAPRPT'.
w_doc_data-obj_descr = ld_mtitle .
w_doc_data-sensitivty = 'F'.
Fill the document data and get size of attachment
CLEAR : w_doc_data,w_cnt.
DESCRIBE TABLE it_attach LINES w_cnt.
READ TABLE it_attach INDEX w_cnt.
w_doc_data-doc_size =
( w_cnt - 1 ) * 255 + STRLEN( it_attach ).
w_doc_data-obj_langu = sy-langu.
w_doc_data-obj_name = 'SAPRPT'.
w_doc_data-obj_descr = ld_mtitle.
w_doc_data-sensitivty = 'F'.
CLEAR t_attachment.
REFRESH t_attachment.
t_attachment[] = pit_attach[].
Describe the body of the message
CLEAR t_packing_list.
REFRESH t_packing_list.
t_packing_list-transf_bin = space.
t_packing_list-head_start = 1.
t_packing_list-head_num = 0.
t_packing_list-body_start = 1.
DESCRIBE TABLE it_message LINES t_packing_list-body_num.
t_packing_list-doc_type = 'RAW'.
APPEND t_packing_list.
Create attachment notification
t_packing_list-transf_bin = 'X'.
t_packing_list-head_start = 1.
t_packing_list-head_num = 1.
t_packing_list-body_start = 1.
DESCRIBE TABLE t_attachment LINES t_packing_list-body_num.
t_packing_list-doc_type = ld_format.
t_packing_list-obj_descr = ld_attdescription.
t_packing_list-obj_name = ld_attfilename.
t_packing_list-doc_size = t_packing_list-body_num * 255.
APPEND t_packing_list.
Add the recipients email address
CLEAR t_receivers.
REFRESH t_receivers.
t_receivers-receiver = ld_email.
t_receivers-rec_type = 'U'.
t_receivers-com_type = 'INT'.
t_receivers-notif_del = 'X'.
t_receivers-notif_ndel = 'X'.
APPEND t_receivers.
CALL FUNCTION 'SO_DOCUMENT_SEND_API1'
EXPORTING
document_data = w_doc_data
put_in_outbox = 'X'
sender_address = ld_sender_address
sender_address_type = ld_sender_address_type
commit_work = 'X'
IMPORTING
sent_to_all = w_sent_all
TABLES
packing_list = t_packing_list
object_header = objhead
contents_bin = t_attachment
contents_txt = it_message
receivers = t_receivers
EXCEPTIONS
too_many_receivers = 1
document_not_sent = 2
document_type_not_exist = 3
operation_no_authorization = 4
parameter_error = 5
x_error = 6
enqueue_error = 7
OTHERS = 8.
Populate zerror return code
ld_error = sy-subrc.
Populate zreceiver return code
LOOP AT t_receivers.
ld_receiver = t_receivers-retrn_code.
ENDLOOP.
ENDFORM.
*& Form INITIATE_MAIL_EXECUTE_PROGRAM
Instructs mail send program for SAPCONNECT to send email.
FORM initiate_mail_execute_program.
WAIT UP TO 2 SECONDS.
SUBMIT rsconn01 WITH mode = 'INT'
WITH output = 'X'
AND RETURN.
ENDFORM. " INITIATE_MAIL_EXECUTE_PROGRAM
*& Form POPULATE_EMAIL_MESSAGE_BODY
Populate message body text
form populate_email_message_body.
REFRESH it_message.
it_message = 'We have manufactured the pump/s against your purchase order and regret to inform'.
APPEND it_message.
it_message = 'you that same cannot be despatched for the reason/s indicated below.'.
APPEND it_message.
it_message = ' '.
APPEND it_message.
it_message = 'Please find the below attachment "Delivery_Blk.xls" for the details.'.
APPEND it_message.
it_message = ' '.
APPEND it_message.
it_message = 'We now request you to send the required detail/s by return mail/post to enable us '.
APPEND it_message.
it_message = 'to despatch the pump/s at the earliest.'.
APPEND it_message.
it_message = ' '.
APPEND it_message.
it_message = ' '.
APPEND it_message.
it_message = 'Best Regards'.
APPEND it_message.
it_message = 'O.E. ENGINEER'.
APPEND it_message.
endform. " POPULATE_EMAIL_MESSAGE_BODYHi,
Refer to the following piece of code. This is the simple code to send email with content and attachment.
Declaration
DATA: lwa_hd_change TYPE sood1,
lt_objcont TYPE STANDARD TABLE OF soli,
lwa_objcont TYPE soli,
lt_receivers TYPE STANDARD TABLE OF soos1,
lwa_receivers TYPE soos1 ,
lt_att_cont TYPE STANDARD TABLE OF soli,
lwa_att_cont TYPE soli,
lt_packing TYPE STANDARD TABLE OF soxpl,
lwa_packing TYPE soxpl,
lf_sent TYPE sonv-flag,
lf_size TYPE i.
CONSTANTS: lc_obj(11) TYPE c VALUE 'BOMSouthco',
lc_desc(20) TYPE c VALUE 'BOM Download',
lc_lang(1) TYPE c VALUE 'E',
lc_raw(3) TYPE c VALUE 'RAW',
lc_net(1) TYPE c VALUE 'U',
lc_mail(4) TYPE c VALUE 'MAIL',
lc_xls(3) TYPE c VALUE 'XLS',
lc_ext(3) TYPE c VALUE 'EXT'.
Passing values to the strutures used in SO_OBJECT_SEND function module
lwa_hd_change-objla = lc_lang.
lwa_hd_change-objnam = lc_obj.
lwa_hd_change-objdes = lc_desc.
lwa_hd_change-objlen = 255.
lwa_objcont-line = text-t29.
APPEND lwa_objcont TO lt_objcont.
CLEAR lwa_objcont.
lwa_receivers-recextnam = text-t31.
lwa_receivers-recesc = lc_net.
lwa_receivers-sndart = lc_mail.
lwa_receivers-sndex = 'X'.
lwa_receivers-sndpri = 1.
lwa_receivers-mailstatus = 'E'.
APPEND lwa_receivers TO lt_receivers.
CLEAR lwa_receivers.
lwa_receivers-recextnam = text-t30.
lwa_receivers-recesc = lc_net.
lwa_receivers-sndart = lc_mail.
lwa_receivers-sndex = 'X'.
lwa_receivers-sndpri = 1.
lwa_receivers-mailstatus = 'E'.
APPEND lwa_receivers TO lt_receivers.
CLEAR lwa_receivers.
Passing values for the attachment file
LOOP AT gt_output INTO gwa_output.
CONCATENATE gf_lf gwa_output-matnr gf_etb gwa_output-idnrk gf_etb
gwa_output-type gf_etb gwa_output-menge gf_etb
gwa_output-meins gf_etb gwa_output-comp gf_etb
INTO lwa_att_cont-line.
APPEND lwa_att_cont TO lt_att_cont.
CLEAR lwa_att_cont.
ENDLOOP.
CHECK lt_att_cont IS NOT INITIAL.
DESCRIBE TABLE lt_att_cont LINES lf_size.
lwa_packing-transf_bin = ' '.
lwa_packing-head_start = 1.
lwa_packing-head_num = 0.
lwa_packing-body_start = 1.
lwa_packing-body_num = lf_size.
lwa_packing-file_ext = lc_xls.
lwa_packing-objlen = lf_size * 255.
lwa_packing-objtp = lc_ext.
lwa_packing-objdes = lc_desc.
lwa_packing-objnam = lc_obj.
APPEND lwa_packing TO lt_packing.
CLEAR lwa_packing.
CHECK gf_error IS NOT INITIAL. "Check if unix file is written
FM to send email to the intended recipients
CALL FUNCTION 'SO_OBJECT_SEND'
EXPORTING
object_hd_change = lwa_hd_change
object_type = lc_raw
IMPORTING
sent_to_all = lf_sent
TABLES
objcont = lt_objcont
receivers = lt_receivers
packing_list = lt_packing
att_cont = lt_att_cont
EXCEPTIONS
active_user_not_exist = 1
communication_failure = 2
component_not_available = 3
folder_not_exist = 4
folder_no_authorization = 5
forwarder_not_exist = 6
note_not_exist = 7
object_not_exist = 8
object_not_sent = 9
object_no_authorization = 10
object_type_not_exist = 11
operation_no_authorization = 12
owner_not_exist = 13
parameter_error = 14
substitute_not_active = 15
substitute_not_defined = 16
system_failure = 17
too_much_receivers = 18
user_not_exist = 19
originator_not_exist = 20
x_error = 21
OTHERS = 22.
IF sy-subrc = 0.
MESSAGE s004 WITH text-t34.
ENDIF.
COMMIT WORK.
Reward if helpful.
Regards,
Ramya -
It's very urgent i need help in smartforms
I need your help for smartforms. I created a smartforms in SD for getting quotations. My problem is that when I run da report it is not executing & if i run smartforms it is giving error in da functional module as - In program "/1BCDWB/SAPLSF00000003 ", the following syntax error occurred:
"The data object "I_HEADER" does not have a component called "BNAME"."
and more over i need a code for my my user tht when i execute this form before displaying print or printpreview i should give a popup window asking da user whether to display item code or not then i should get da print or printpreview. when the user needs item code he can print as well if he don't it should not display. this da code i return in se38 editor. In smartforms i wrote code for getting company address etc. I did not write anything in initialization.
source code
*& Application : Sales & Distribution (SD)
*& Description : This report will Print Sales Order Confirmation Using Smartform
*& Transaction Code :
*& Area Menu Code : ZSD
*& Layout : ZSDORDERCONF
*& Dev.Complited On :
REPORT ZSDR0004.
INCLUDE: ZSDI0003.
S U B R O U T I N E S *
FORM ENTRY USING RETURN_CODE TYPE I
US_SCREEN TYPE C.
CLEAR RETCODE.
XSCREEN = US_SCREEN.
PERFORM PROCESSING.
IF RETCODE NE 0.
RETURN_CODE = 1.
ELSE.
RETURN_CODE = 0.
ENDIF.
ENDFORM. "ENTRY
FORM PROCESSING *
FORM PROCESSING.
PERFORM GET_DATA.
CHECK RETCODE = 0.
PERFORM PRINT_DATA.
CHECK RETCODE = 0.
ENDFORM. "PROCESSING
FORM CHECK_REPEAT *
A text is printed, if it is a repeat print for the document. *
FORM CHECK_REPEAT.
CLEAR REPEAT.
SELECT * INTO *NAST FROM NAST WHERE KAPPL = NAST-KAPPL
AND OBJKY = NAST-OBJKY
AND KSCHL = NAST-KSCHL
AND SPRAS = NAST-SPRAS
AND PARNR = NAST-PARNR
AND PARVW = NAST-PARVW
AND NACHA BETWEEN '1' AND '4'.
CHECK *NAST-VSTAT = '1'.
REPEAT = 'X'.
EXIT.
ENDSELECT.
ENDFORM. "CHECK_REPEAT
FORM GET_DATA *
General provision of data for the form *
FORM GET_DATA.
DATA: US_VEDA_VBELN LIKE VEDA-VBELN.
DATA: US_VEDA_POSNR_LOW LIKE VEDA-VPOSN.
DATA: DA_MESS LIKE VBFS OCCURS 0 WITH HEADER LINE.
DATA: DA_SUBRC LIKE SY-SUBRC,
DA_DRAGR LIKE TVAG-DRAGR.
DATA: DA_GANF(1) TYPE C, "Print flag for billing correction
DA_LANF(1) TYPE C. "Print flag for billing correction
CALL FUNCTION 'RV_PRICE_PRINT_GET_MODE'
IMPORTING
E_PRINT_MODE = PRICE_PRINT_MODE.
IF PRICE_PRINT_MODE EQ CHARA.
CALL FUNCTION 'RV_PRICE_PRINT_REFRESH'
TABLES
TKOMV = TKOMV.
ENDIF.
CLEAR KOMK.
CLEAR KOMP.
VBCO3-MANDT = SY-MANDT.
VBCO3-SPRAS = NAST-SPRAS.
VBCO3-VBELN = NAST-OBJKY.
VBCO3-KUNDE = NAST-PARNR.
VBCO3-PARVW = NAST-PARVW.
CALL FUNCTION 'RV_DOCUMENT_PRINT_VIEW'
EXPORTING
COMWA = VBCO3
IMPORTING
KOPF = VBDKA
TABLES
POS = TVBDPA
MESS = DA_MESS
EXCEPTIONS
FEHLER_BEI_DATENBESCHAFFUNG = 1.
IF SY-SUBRC NE 0.
PERFORM PROTOCOL_UPDATE.
RETCODE = 1.
EXIT.
ELSE.
LOOP AT DA_MESS.
SY-MSGID = DA_MESS-MSGID.
SY-MSGNO = DA_MESS-MSGNO.
SY-MSGTY = DA_MESS-MSGTY.
SY-MSGV1 = DA_MESS-MSGV1.
SY-MSGV2 = DA_MESS-MSGV2.
SY-MSGV3 = DA_MESS-MSGV3.
SY-MSGV4 = DA_MESS-MSGV4.
PERFORM PROTOCOL_UPDATE.
ENDLOOP.
ENDIF.
*Get Header Data In I_HEADER Table.
SELECT VBAKVBELN VBAKAUDAT VBAKKUNNR VBAKWAERK
VBAKVKORG VBAKANGDT VBAKBNDDT VBAKVBTYP
VBAKKNUMV VBAKKALSM VBAKNETWR VBAKVKBUR
VBAKBNAME VBKDBSTKD VBKDBSTDK VBKDINCO1
VBKDINCO2 VBKDZTERM
INTO CORRESPONDING FIELDS OF TABLE I_HEADER
FROM VBAK
JOIN VBKD ON VBKDVBELN = VBAKVBELN
WHERE VBAK~VBELN = VBCO3-VBELN.
**Get Address Number For Company
IF NOT I_HEADER[] IS INITIAL.
READ TABLE I_HEADER INDEX 1.
SELECT SINGLE BUKRS ADRNR INTO (COMPCD, ADDCOMP)
FROM TVKO
WHERE VKORG = I_HEADER-VKORG.
ENDIF.
fill address key --> necessary for emails
ADDR_KEY-ADDRNUMBER = VBDKA-ADRNR.
ADDR_KEY-PERSNUMBER = VBDKA-ADRNP.
ADDR_KEY-ADDR_TYPE = VBDKA-ADDRESS_TYPE.
Fetch servicecontract-data and notice-data for head and position.
US_VEDA_VBELN = VBDKA-VBELN.
US_VEDA_POSNR_LOW = POSNR_LOW.
CALL FUNCTION 'SD_VEDA_GET_PRINT_DATA'
EXPORTING
I_DOCUMENT_NUMBER = US_VEDA_VBELN
I_LANGUAGE = SY-LANGU
I_POSNR_LOW = US_VEDA_POSNR_LOW
TABLES
PRINT_DATA_POS = TKOMSERVP
PRINT_DATA_HEAD = TKOMSERVH
PRINT_NOTICE_POS = TKOMSERVPN
PRINT_NOTICE_HEAD = TKOMSERVHN.
PERFORM GET_CONTROLL_DATA.
PERFORM SENDER.
PERFORM CHECK_REPEAT.
LOOP AT TVBDPA.
VBDPA = TVBDPA.
IF VBDPA-DRAGR EQ SPACE. "Print rejected item?
IF VBDPA-POSNR_NEU NE SPACE. "Item
PERFORM GET_ITEM_SERIALS.
PERFORM GET_ITEM_CHARACTERISTICS.
PERFORM GET_ITEM_BILLING_SCHEDULES.
PERFORM GET_ITEM_PRICES.
PERFORM GET_ITEM_ADDIS.
ENDIF.
ENDIF.
ENDLOOP.
ENDFORM. "GET_DATA
FORM GET_ITEM_BILLING_SCHEDULES *
In this routine the billing schedules are fetched from the *
database. *
FORM GET_ITEM_BILLING_SCHEDULES.
REFRESH TFPLTDR.
CHECK NOT VBDPA-FPLNR IS INITIAL.
CALL FUNCTION 'BILLING_SCHED_PRINTVIEW_READ'
EXPORTING
I_FPLNR = VBDPA-FPLNR
I_LANGUAGE = NAST-SPRAS
I_VBELN = VBDKA-VBELN
TABLES
ZFPLTDR = TFPLTDR.
ENDFORM. "GET_ITEM_BILLING_SCHEDULES
*& FORM GET_ITEM_ADDIS
Additionals data are fetched from database
FORM GET_ITEM_ADDIS.
CLEAR: TADDI_PRINT.
CALL FUNCTION 'WTAD_ADDIS_IN_SO_PRINT'
EXPORTING
FI_VBELN = VBDKA-VBELN
FI_POSNR = VBDPA-POSNR
FI_LANGUAGE = SY-LANGU
TABLES
FET_ADDIS_IN_SO_PRINT = TADDI_PRINT
EXCEPTIONS
ADDIS_NOT_ACTIVE = 1
NO_ADDIS_FOR_SO_ITEM = 2
OTHERS = 3.
ENDFORM. " GET_ITEM_ADDIS
FORM GET_ITEM_CHARACTERISTICS *
In this routine the configuration data item is fetched from *
the database. *
FORM GET_ITEM_CHARACTERISTICS.
DATA DA_T_CABN LIKE CABN OCCURS 10 WITH HEADER LINE.
DATA: BEGIN OF DA_KEY,
MANDT LIKE CABN-MANDT,
ATINN LIKE CABN-ATINN,
END OF DA_KEY.
REFRESH TKOMCON.
CHECK NOT VBDPA-CUOBJ IS INITIAL AND
VBDPA-ATTYP NE VAR_TYP.
CALL FUNCTION 'VC_I_GET_CONFIGURATION'
EXPORTING
INSTANCE = VBDPA-CUOBJ
LANGUAGE = NAST-SPRAS
PRINT_SALES = CHARX
TABLES
CONFIGURATION = TKOMCON
EXCEPTIONS
OTHERS = 4.
RANGES : DA_IN_CABN FOR DA_T_CABN-ATINN.
Beschreibung der Merkmale wegen Objektmerkmalen auf sdcom-vkond holen
CLEAR DA_IN_CABN. REFRESH DA_IN_CABN.
LOOP AT TKOMCON.
DA_IN_CABN-OPTION = 'EQ'.
DA_IN_CABN-SIGN = 'I'.
DA_IN_CABN-LOW = TKOMCON-ATINN.
APPEND DA_IN_CABN.
ENDLOOP.
CLEAR DA_T_CABN. REFRESH DA_T_CABN.
CALL FUNCTION 'CLSE_SELECT_CABN'
EXPORTING
KEY_DATE = SY-DATUM
BYPASSING_BUFFER = ' '
WITH_PREPARED_PATTERN = ' '
I_AENNR = ' '
IMPORTING
AMBIGUOUS_OBJ_CHARACTERISTIC =
TABLES
IN_CABN = DA_IN_CABN
T_CABN = DA_T_CABN
EXCEPTIONS
NO_ENTRY_FOUND = 1
OTHERS = 2.
Preisfindungsmerkmale / Merkmale auf VCSD_UPDATE herausnehmen
SORT DA_T_CABN.
LOOP AT TKOMCON.
DA_KEY-MANDT = SY-MANDT.
DA_KEY-ATINN = TKOMCON-ATINN.
READ TABLE DA_T_CABN WITH KEY DA_KEY BINARY SEARCH.
IF SY-SUBRC <> 0 OR
( ( DA_T_CABN-ATTAB = 'SDCOM' AND
DA_T_CABN-ATFEL = 'VKOND' ) OR
( DA_T_CABN-ATTAB = 'VCSD_UPDATE' ) ) .
DELETE TKOMCON.
ENDIF.
ENDLOOP.
ENDFORM. "GET_ITEM_CHARACTERISTICS
FORM GET_ITEM_PRICES *
In this routine the price data for the item is fetched from *
the database. *
FORM GET_ITEM_PRICES.
CLEAR: KOMP,
TKOMV.
IF KOMK-KNUMV NE VBDKA-KNUMV OR
KOMK-KNUMV IS INITIAL.
CLEAR KOMK.
KOMK-MANDT = SY-MANDT.
KOMK-KALSM = VBDKA-KALSM.
KOMK-KAPPL = PR_KAPPL.
KOMK-WAERK = VBDKA-WAERK.
KOMK-KNUMV = VBDKA-KNUMV.
KOMK-KNUMA = VBDKA-KNUMA.
KOMK-VBTYP = VBDKA-VBTYP.
KOMK-LAND1 = VBDKA-LAND1.
KOMK-VKORG = VBDKA-VKORG.
KOMK-VTWEG = VBDKA-VTWEG.
KOMK-SPART = VBDKA-SPART.
KOMK-BUKRS = VBDKA-BUKRS_VF.
KOMK-HWAER = VBDKA-WAERS.
KOMK-PRSDT = VBDKA-ERDAT.
KOMK-KURST = VBDKA-KURST.
KOMK-KURRF = VBDKA-KURRF.
KOMK-KURRF_DAT = VBDKA-KURRF_DAT.
ENDIF.
KOMP-KPOSN = VBDPA-POSNR.
KOMP-KURSK = VBDPA-KURSK.
KOMP-KURSK_DAT = VBDPA-KURSK_DAT.
if vbdka-vbtyp ca 'HKNOT6'.
if vbdpa-shkzg ca ' A'.
komp-shkzg = 'X'.
endif.
else.
if vbdpa-shkzg ca 'BX'.
komp-shkzg = 'X'.
endif.
endif.
IF PRICE_PRINT_MODE EQ CHARA.
CALL FUNCTION 'RV_PRICE_PRINT_ITEM'
EXPORTING
COMM_HEAD_I = KOMK
COMM_ITEM_I = KOMP
LANGUAGE = NAST-SPRAS
IMPORTING
COMM_HEAD_E = KOMK
COMM_ITEM_E = KOMP
TABLES
TKOMV = TKOMV
TKOMVD = TKOMVD.
ELSE.
CALL FUNCTION 'RV_PRICE_PRINT_ITEM_BUFFER'
EXPORTING
COMM_HEAD_I = KOMK
COMM_ITEM_I = KOMP
LANGUAGE = NAST-SPRAS
IMPORTING
COMM_HEAD_E = KOMK
COMM_ITEM_E = KOMP
TABLES
TKOMV = TKOMV
TKOMVD = TKOMVD.
ENDIF.
ENDFORM. "GET_ITEM_PRICES
FORM GET_HEADER_PRICES *
In this routine the price data for the header is fetched from *
the database. *
FORM GET_HEADER_PRICES.
LOOP AT TVBDPA.
CALL FUNCTION 'SD_TAX_CODE_MAINTAIN'
EXPORTING
KEY_KNUMV = VBDKA-KNUMV
KEY_KPOSN = TVBDPA-POSNR
I_APPLICATION = ' '
I_PRICING_PROCEDURE = VBDKA-KALSM
TABLES
XKOMV = TKOMV.
ENDLOOP.
IF PRICE_PRINT_MODE EQ CHARA.
CALL FUNCTION 'RV_PRICE_PRINT_HEAD'
EXPORTING
COMM_HEAD_I = KOMK
LANGUAGE = NAST-SPRAS
IMPORTING
COMM_HEAD_E = KOMK
TABLES
TKOMV = TKOMV
TKOMVD = TKOMVD.
ELSE.
CALL FUNCTION 'RV_PRICE_PRINT_HEAD_BUFFER'
EXPORTING
COMM_HEAD_I = KOMK
LANGUAGE = NAST-SPRAS
IMPORTING
COMM_HEAD_E = KOMK
TABLES
TKOMV = TKOMV
TKOMVD = TKOMVD.
ENDIF.
ENDFORM. "GET_HEADER_PRICES
FORM PRINT_DATA *
Print Quotation *
FORM PRINT_DATA.
DATA: ls_control TYPE ssfctrlop.
data: OUTPUT_OPTIONS TYPE SSFCOMPOP,cf_retcode type sy-subrc.
DATA: ls_print_data_to_read TYPE lbbil_print_data_to_read.
DATA: ls_addr_key LIKE addr_key.
DATA: ls_dlv-land LIKE vbrk-land1.
DATA: ls_job_info TYPE ssfcrescl.
DATA: ls_control_param TYPE ssfctrlop.
DATA: ls_composer_param TYPE ssfcompop.
DATA: ls_recipient TYPE swotobjid.
DATA: ls_sender TYPE swotobjid.
DATA: NAST_ANZAL LIKE NAST-ANZAL. "Number of outputs (Orig. + Cop.)
DATA: NAST_TDARMOD LIKE NAST-TDARMOD. "Archiving only one time
DATA: ls_bil_invoice TYPE lbbil_invoice.
SELECT SINGLE SFORM INTO LF_FORMNAME
FROM TNAPR
WHERE KSCHL = NAST-KSCHL
AND NACHA = NAST-NACHA.
*IF NAST-KSCHL = 'ZORD'.
lf_formname = 'ZSDORDERCONF'.
*ELSEIF NAST-KSCHL = 'ZOR1'.
lf_formname = 'ZSDORDERCONF'.
*ELSEIF NAST-KSCHL = 'ZOR2'.
lf_formname = 'ZCSORDERCONF'.
ENDIF.
determine smartform function module for invoice
CALL FUNCTION 'SSF_FUNCTION_MODULE_NAME'
EXPORTING
formname = lf_formname
IMPORTING
fm_name = lf_fm_name
EXCEPTIONS
no_form = 1
no_function_module = 2
OTHERS = 3.
IF sy-subrc <> 0.
ENDIF.
READ TABLE I_HEADER INDEX 1.
ls_controL-no_dialog = 'X'.
if sy-ucomm = 'VIEW'.
LS_CONTROL-PREVIEW = 'X'.
endif.
CALL FUNCTION LF_FM_NAME
EXPORTING
control_parameters = ls_control
OUTPUT_OPTIONS = OUTPUT_OPTIONS
SO_VBELN = I_HEADER-VBELN
SO_AUDAT = I_HEADER-AUDAT
SO_REPEAT = REPEAT
SO_TYPE = I_HEADER-VBTYP
SO_CADD = ADDCOMP
SO_CCODE = COMPCD
TABLES
I_HEADER = I_HEADER
TKOMV = TKOMV
I_ITEM = TVBDPA
I_XDATA = I_XDATA
EXCEPTIONS
FORMATTING_ERROR = 1
INTERNAL_ERROR = 2
SEND_ERROR = 3
USER_CANCELED = 4
OTHERS = 5.
IF SY-SUBRC <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
endif.
ENDFORM. "PRINT_DATA
FORM PROTOCOL_UPDATE *
The messages are collected for the processing protocol. *
FORM PROTOCOL_UPDATE.
CHECK XSCREEN = SPACE.
CALL FUNCTION 'NAST_PROTOCOL_UPDATE'
EXPORTING
MSG_ARBGB = SYST-MSGID
MSG_NR = SYST-MSGNO
MSG_TY = SYST-MSGTY
MSG_V1 = SYST-MSGV1
MSG_V2 = SYST-MSGV2
MSG_V3 = SYST-MSGV3
MSG_V4 = SYST-MSGV4
EXCEPTIONS
OTHERS = 1.
ENDFORM. "PROTOCOL_UPDATE
FORM SENDER *
This routine determines the address of the sender (Table VKO) *
FORM SENDER.
SELECT SINGLE * FROM TVKO WHERE VKORG = VBDKA-VKORG.
IF SY-SUBRC NE 0.
SYST-MSGID = 'VN'.
SYST-MSGNO = '203'.
SYST-MSGTY = 'E'.
SYST-MSGV1 = 'TVKO'.
SYST-MSGV2 = SYST-SUBRC.
PERFORM PROTOCOL_UPDATE.
EXIT.
ENDIF.
CLEAR GV_FB_ADDR_GET_SELECTION.
GV_FB_ADDR_GET_SELECTION-ADDRNUMBER = TVKO-ADRNR. "SADR40A
CALL FUNCTION 'ADDR_GET'
EXPORTING
ADDRESS_SELECTION = GV_FB_ADDR_GET_SELECTION
ADDRESS_GROUP = 'CA01'
IMPORTING
SADR = SADR
EXCEPTIONS
OTHERS = 01.
IF SY-SUBRC NE 0.
CLEAR SADR.
ENDIF. "SADR40A
VBDKA-SLAND = SADR-LAND1.
IF SY-SUBRC NE 0.
SYST-MSGID = 'VN'.
SYST-MSGNO = '203'.
SYST-MSGTY = 'E'.
SYST-MSGV1 = 'SADR'.
SYST-MSGV2 = SYST-SUBRC.
PERFORM PROTOCOL_UPDATE.
ENDIF.
SELECT SINGLE * FROM TVBUR WHERE VKBUR = VBDKA-VKBUR.
IF SY-SUBRC NE 0.
SYST-MSGID = 'VN'.
SYST-MSGNO = '203'.
SYST-MSGTY = 'E'.
SYST-MSGV1 = 'TVBUR'.
SYST-MSGV2 = SYST-SUBRC.
PERFORM PROTOCOL_UPDATE.
ENDIF.
ENDFORM. "SENDER
*& Form GET_ITEM_SERIALS
This routine give back the serialnumbers of salesdocument *
position. The numbers are processed as print-lines in the *
table KOMSER_PRINT. *
--> US_VBELN Salesdocument
--> US_POSNR Position of the salesdocument
FORM GET_ITEM_SERIALS.
DATA: KEY_DATA LIKE RSEROB,
SERNOS LIKE RSEROB OCCURS 0 WITH HEADER LINE.
KEY_DATA-TASER = 'SER02'.
KEY_DATA-SDAUFNR = VBDKA-VBELN.
KEY_DATA-POSNR = VBDPA-POSNR.
IF KEY_DATA-SDAUFNR IS INITIAL AND NOT
KEY_DATA-POSNR IS INITIAL.
beim Anlegen ist Belegnummer leer - deshalb Dummy-Belegnummer
KEY_DATA-SDAUFNR = CHAR$.
ENDIF.
Read the Serialnumbers of a Position.
REFRESH: TKOMSER,
TKOMSER_PRINT.
CALL FUNCTION 'GET_SERNOS_OF_DOCUMENT'
EXPORTING
KEY_DATA = KEY_DATA
TABLES
SERNOS = SERNOS
EXCEPTIONS
KEY_PARAMETER_ERROR = 1
NO_SUPPORTED_ACCESS = 2
NO_DATA_FOUND = 3
OTHERS = 4.
IF SY-SUBRC NE 0 AND
SY-SUBRC NE 3.
PERFORM PROTOCOL_UPDATE.
ENDIF.
CHECK SY-SUBRC EQ 0.
Serialnummern übergeben
TKOMSER-VBELN = SERNOS-SDAUFNR.
TKOMSER-POSNR = SERNOS-POSNR.
LOOP AT SERNOS.
TKOMSER-SERNR = SERNOS-SERNR.
APPEND TKOMSER.
ENDLOOP.
Process the stringtable for Printing.
CALL FUNCTION 'PROCESS_SERIALS_FOR_PRINT'
EXPORTING
I_BOUNDARY_LEFT = '(_'
I_BOUNDARY_RIGHT = '_)'
I_SEP_CHAR_STRINGS = ',_'
I_SEP_CHAR_INTERVAL = '_-_'
I_USE_INTERVAL = 'X'
I_BOUNDARY_METHOD = 'C'
I_LINE_LENGTH = 50
I_NO_ZERO = 'X'
I_ALPHABET = SY-ABCDE
I_DIGITS = '0123456789'
I_SPECIAL_CHARS = '-'
I_WITH_SECOND_DIGIT = ' '
TABLES
SERIALS = TKOMSER
SERIALS_PRINT = TKOMSER_PRINT
EXCEPTIONS
BOUNDARY_MISSING = 01
INTERVAL_SEPARATION_MISSING = 02
LENGTH_TO_SMALL = 03
INTERNAL_ERROR = 04
WRONG_METHOD = 05
WRONG_SERIAL = 06
TWO_EQUAL_SERIALS = 07
SERIAL_WITH_WRONG_CHAR = 08
SERIAL_SEPARATION_MISSING = 09.
IF SY-SUBRC NE 0.
PERFORM PROTOCOL_UPDATE.
ENDIF.
ENDFORM. " GET_ITEM_SERIALS
*eject
*& Form GET_CONTROLL_DATA
Checks if servicedata for the header exists. *
Checks if servicedata for the position exists. *
Checks if noticedata for the header exists. *
Checks if noticedata for the position exists. *
FORM GET_CONTROLL_DATA.
DATA: LINES TYPE I.
Exists servicedata for the header?
DESCRIBE TABLE TKOMSERVH LINES LINES.
IF LINES GT 0.
STEU-VDKEX = 'X'.
ENDIF.
Exists servicedata for the position?
DESCRIBE TABLE TKOMSERVP LINES LINES.
IF LINES GT 0.
STEU-VDPEX = 'X'.
ENDIF.
Exists noticedata for the header?
DESCRIBE TABLE TKOMSERVHN LINES LINES.
IF LINES GT 0.
STEU-KBKEX = 'X'.
ENDIF.
Exists noticedata for the position?
DESCRIBE TABLE TKOMSERVPN LINES LINES.
IF LINES GT 0.
STEU-KBPEX = 'X'.
ENDIF.
ENDFORM. " GET_CONTROLL_DATA
*eject
*& Form get_fax_land
text
-->P_NAST_TLAND text
form get_fax_land using p_nast_land like nast-tland.
DATA L_land like nast-tland .
clear L_land.
IF NOT addr_key-addrnumber IS INITIAL.
CALL FUNCTION 'WFMC_FAXNUMBER_FOR_ADDRESS'
EXPORTING
adrnr = addr_key-addrnumber
IMPORTING
tland = L_land
EXCEPTIONS
addr_not_exist = 1
OTHERS = 2.
IF sy-subrc = 0 AND NOT L_land IS INITIAL.
p_nast_land = L_land.
ENDIF.
ENDIF.
endform. " get_fax_land
*& Form get_data1
text
-->P_LS_PRINT_DATA_TO_READ text
<--P_LS_ADDR_KEY text
<--P_LS_DLV_LAND text
<--P_LS_BIL_INVOICE text
<--P_CF_RETCODE text
FORM get_data1
USING IS_PRINT_DATA_TO_READ TYPE LBBIL_PRINT_DATA_TO_READ
CHANGING CS_ADDR_KEY LIKE ADDR_KEY
CS_DLV-LAND LIKE VBRK-LAND1
CS_BIL_INVOICE TYPE LBBIL_INVOICE
CF_RETCODE.
IF NAST-OBJKY+10 NE SPACE.
NAST-OBJKY = NAST-OBJKY+16(10).
ELSE.
NAST-OBJKY = NAST-OBJKY.
ENDIF.
read print data
CALL FUNCTION 'LB_BIL_INV_OUTP_READ_PRTDATA'
EXPORTING
IF_BIL_NUMBER = NAST-OBJKY
IF_PARVW = NAST-PARVW
IF_PARNR = NAST-PARNR
IF_LANGUAGE = NAST-SPRAS
IS_PRINT_DATA_TO_READ = IS_PRINT_DATA_TO_READ
IMPORTING
ES_BIL_INVOICE = CS_BIL_INVOICE
EXCEPTIONS
RECORDS_NOT_FOUND = 1
RECORDS_NOT_REQUESTED = 2
OTHERS = 3.
IF SY-SUBRC <> 0.
error handling
CF_RETCODE = SY-SUBRC.
PERFORM PROTOCOL_UPDATE.
ENDIF.
get nast partner adress for communication strategy
PERFORM GET_ADDR_KEY USING CS_BIL_INVOICE-HD_ADR
CHANGING CS_ADDR_KEY.
get delivery land
PERFORM GET_DLV-LAND USING CS_BIL_INVOICE-HD_GEN
CHANGING CS_DLV-LAND.
ENDFORM. " get_data1
*& Form GET_ADDR_KEY
text
-->P_CS_BIL_INVOICE_HD_ADR text
<--P_CS_ADDR_KEY text
FORM GET_ADDR_KEY USING IT_HD_ADR TYPE LBBIL_INVOICE-HD_ADR
CHANGING CS_ADDR_KEY LIKE ADDR_KEY.
FIELD-SYMBOLS -ADDRESS_TYPE.
ENDIF.
ENDFORM. " GET_ADDR_KEY
*& Form GET_DLV-LAND
text
-->P_CS_BIL_INVOICE_HD_GEN text
<--P_CS_DLV_LAND text
FORM GET_DLV-LAND USING IT_HD_GEN TYPE LBBIL_INVOICE-HD_GEN
CHANGING CS_DLV-LAND LIKE VBRK-LAND1.
CS_DLV-LAND = IT_HD_GEN-DLV_LAND.
ENDFORM. " GET_DLV-LAND
*& Form set_print_data_to_read
text
-->P_LF_FORMNAME text
<--P_LS_PRINT_DATA_TO_READ text
<--P_CF_RETCODE text
FORM set_print_data_to_read USING IF_FORMNAME LIKE TNAPR-SFORM
CHANGING CS_PRINT_DATA_TO_READ TYPE LBBIL_PRINT_DATA_TO_READ
CF_RETCODE.
FIELD-SYMBOLS: TYPE XFELD.
DATA: LT_FIELDLIST TYPE TSFFIELDS.
set print data requirements
DO.
ASSIGN COMPONENT SY-INDEX OF STRUCTURE
CS_PRINT_DATA_TO_READ TO = 'X'.
ENDDO.
CALL FUNCTION 'SSF_FIELD_LIST'
EXPORTING
FORMNAME = IF_FORMNAME
VARIANT = ' '
IMPORTING
FIELDLIST = LT_FIELDLIST
EXCEPTIONS
NO_FORM = 1
NO_FUNCTION_MODULE = 2
OTHERS = 3.
IF SY-SUBRC <> 0.
error handling
CF_RETCODE = SY-SUBRC.
PERFORM PROTOCOL_UPDATE.
ENDIF.
ENDFORM. " set_print_data_to_read
*& Form set_print_param
text
-->P_LS_ADDR_KEY text
-->P_LS_DLV_LAND text
<--P_LS_CONTROL_PARAM text
<--P_LS_COMPOSER_PARAM text
<--P_LS_RECIPIENT text
<--P_LS_SENDER text
<--P_CF_RETCODE text
FORM set_print_param using IS_ADDR_KEY LIKE ADDR_KEY
IS_DLV-LAND LIKE VBRK-LAND1
CHANGING CS_CONTROL_PARAM TYPE SSFCTRLOP
CS_COMPOSER_PARAM TYPE SSFCOMPOP
CS_RECIPIENT TYPE SWOTOBJID
CS_SENDER TYPE SWOTOBJID
CF_RETCODE TYPE SY-SUBRC.
DATA: LS_ITCPO TYPE ITCPO.
DATA: LF_REPID TYPE SY-REPID.
DATA: LF_DEVICE TYPE TDDEVICE.
DATA: LS_RECIPIENT TYPE SWOTOBJID.
DATA: LS_SENDER TYPE SWOTOBJID.
LF_REPID = SY-REPID.
CALL FUNCTION 'WFMC_PREPARE_SMART_FORM'
EXPORTING
PI_NAST = NAST
PI_COUNTRY = IS_DLV-LAND
PI_ADDR_KEY = IS_ADDR_KEY
PI_REPID = LF_REPID
PI_SCREEN = XSCREEN
IMPORTING
PE_RETURNCODE = CF_RETCODE
PE_ITCPO = LS_ITCPO
PE_DEVICE = LF_DEVICE
PE_RECIPIENT = CS_RECIPIENT
PE_SENDER = CS_SENDER.
IF CF_RETCODE = 0.
MOVE-CORRESPONDING LS_ITCPO TO CS_COMPOSER_PARAM.
CS_CONTROL_PARAM-NO_OPEN
CS_CONTROL_PARAM-NO_CLOSE
CS_CONTROL_PARAM-DEVICE = LF_DEVICE.
CS_CONTROL_PARAM-NO_DIALOG = 'X'.
CS_CONTROL_PARAM-PREVIEW = XSCREEN.
CS_CONTROL_PARAM-GETOTF = LS_ITCPO-TDGETOTF.
CS_CONTROL_PARAM-LANGU = NAST-SPRAS.
CS_CONTROL_PARAM-REPLANGU1
CS_CONTROL_PARAM-REPLANGU2
CS_CONTROL_PARAM-REPLANGU3
CS_CONTROL_PARAM-STARTPAGE
ENDIF.
ENDFORM. " set_print_param
*& Form add_smfrm_prot
text
--> p1 text
<-- p2 text
FORM add_smfrm_prot .
DATA: LT_ERRORTAB TYPE TSFERROR.
DATA: LF_MSGNR TYPE SY-MSGNO.
FIELD-SYMBOLS: TYPE LINE OF TSFERROR.
get smart form protocoll
CALL FUNCTION 'SSF_READ_ERRORS'
IMPORTING
ERRORTAB = LT_ERRORTAB.
add smartform protocoll to nast protocoll
LOOP AT LT_ERRORTAB ASSIGNING .
CLEAR LF_MSGNR.
LF_MSGNR = <FS_ERRORTAB>-ERRNUMBER.
CALL FUNCTION 'NAST_PROTOCOL_UPDATE'
EXPORTING
MSG_ARBGB = -MSGID
MSG_NR = LF_MSGNR
MSG_NR = -MSGV4
EXCEPTIONS
OTHERS = 1.
ENDLOOP.
ENDFORM. " add_smfrm_prot
*& Form protocol_update_spool
text
-->P_1115 text
-->P_LS_SPOOLID text
-->P_SPACE text
-->P_SPACE text
-->P_SPACE text
FORM protocol_update_spool USING SYST_MSGNO
P_LS_SPOOLID
P_SPACE1
P_SPACE2
P_SPACE3.
syst-msgid = 'VN'.
syst-msgno = syst_msgno.
syst-msgv1 = p_ls_spoolid.
CONDENSE syst-msgv1.
CHECK xscreen = space.
CALL FUNCTION 'NAST_PROTOCOL_UPDATE'
EXPORTING
msg_arbgb = syst-msgid
msg_nr = syst-msgno
msg_ty = syst-msgty
msg_v1 = syst-msgv1
msg_v2 = p_space1
msg_v3 = p_space2
msg_v4 = p_space3
EXCEPTIONS
OTHERS = 1.
ENDFORM. " protocol_update_spool
This is Include ZSDI0003
*& Include ZSDI0003
TABLES: KOMK, "Communicationarea for conditions
KOMP, "Communicationarea for conditions
KOMVD, "Communicationarea for conditions
VBCO3, "Communicationarea for view
VBDKA, "Headerview
VBDPA, "Itemview
VBDPAU, "Subitemnumbers
CONF_OUT, "Configuration data
SADR, "Addresses
TVAG, "Reason for rejection
VEDKA, "Servicecontract head data
VEDPA, "Servicecontract position data
VEDKN, "Servicecontract head notice data
VEDPN, "Servicecontract pos. notice data
RISERLS, "Serialnumbers
KOMSER, "Serialnumbers for print
TVBUR, "Sales office
TVKO, "Sales organisation
ADRS, "Communicationarea for Address
FPLTDR, "billing schedules
WTAD_ADDIS_IN_SO_PRINT, "additional
WTAD_BUYING_PRINT_EXTRA_TEXT, "texts belonging to additional
VBAK, "Sales Document Header
VBAP, "Sales Document Item
VBPA, "Sales Document: Partner
T001, "Company codes
MAST, "Material to BOM Link
STKO. "BOM Header
INCLUDE RVADTABL.
INCLUDE RVDIREKT.
INCLUDE VEDADATA.
data for access to central address maintenance
INCLUDE SDZAVDAT.
TYPE-POOLS: ADDI.
DATA PRICE_PRINT_MODE(1) TYPE C. "Print-mode
DATA: RETCODE LIKE SY-SUBRC. "Returncode
DATA: REPEAT(1) TYPE C.
DATA: XSCREEN(1) TYPE C. "Output on printer or screen
DATA: BEGIN OF STEU, "Controldata for output
VDKEX(1) TYPE C,
VDPEX(1) TYPE C,
KBKEX(1) TYPE C,
KBPEX(1) TYPE C,
1) you shouldn't have to do anything with the properties file written for a specific Locale.
2) check this out: http://java.sun.com/j2se/1.4/docs/guide/intl/encoding.doc.html
3) BIG5 is BIG5 everywhere.
4) don't know about this one
5,6,7) If you have Windows 98 Chinese Edition, you can probably switch back and forth between English and Chinese -- just put the Chinese characters in a string much like the normal characters. Otherwise, you'll have to enter the Unicode char.
V.V. -
In creation of SO system always is giving memory out of range
Hi all,
I have just started my career in SAP: SD. while creation of SO the system takes a long time and always giving an error which tells that memory exceeds the limit, etc. I specified the error to the basis person, but was later told that it is the problem from my side i.e. i am not giving proper entries or something else, because of which system is creating problem.Can you people tell me where i may be wrong, or what in the mind should i keep while creation of sale order.
Regards,
Gaurav KumarThis can be one reason. I have quoted SAP Note 486794.
When you use component IS-MILL, program terminations with error MEMORY_NO_MORE_PAGING can occur in Transactions VA01, VA02, VA03.
In program MILL_SE_MUEBS_LESEN, function module CUCB_GET_SINGLE_INSTANCE is called instead of function module VC_I_GET_CONFIGURATION (see Note 428343).
Thanks,
Ashish -
Exception condition "INTERNAL_ERROR" raised
Runtime Errors RAISE_EXCEPTION
Date and Time 21.08.2014 21:53:43
What happened?
The current ABAP/4 program encountered an unexpected
situation.
What can you do?
Note down which actions and inputs caused the error.
To process the problem further, contact you SAP system
administrator.
Using Transaction ST22 for ABAP Dump Analysis, you can look
at and manage termination messages, and you can also
keep them for a long time.
Error analysis
A RAISE statement in the program "SAPLCEI0" raised the exception
condition "INTERNAL_ERROR".
Since the exception was not intercepted by a superior
program, processing was terminated.
Short description of exception condition:
For detailed documentation of the exception condition, use
Transaction SE37 (Function Library). You can take the called
function module from the display of active calls.
How to correct the error
If the error occures in a non-modified SAP program, you may be able to
find an interim solution in an SAP Note.
If you have access to SAP Notes, carry out a search with the following
keywords:
"RAISE_EXCEPTION" " "
"SAPLCEI0" or "LCEI0U30"
"VC_I_GET_CONFIGURATION"
or
"SAPLCEI0" "INTERNAL_ERROR"
or
"SAPMSSY1 " "INTERNAL_ERROR"
If you cannot solve the problem yourself and want to send an error
notification to SAP, include the following information:
1. The description of the current problem (short dump)
To save the description, choose "System->List->Save->Local File
(Unconverted)".
2. Corresponding system log
Display the system log by calling transaction SM21.
Restrict the time interval to 10 minutes before and five minutes
after the short dump. Then choose "System->List->Save->Local File
(Unconverted)".
3. If the problem occurs in a problem of your own or a modified SAP
program: The source code of the program
In the editor, choose "Utilities->More
Utilities->Upload/Download->Download".
4. Details about the conditions under which the error occurred or which
actions and input led to the error.
System environment
SAP-Release 700
Application server... "sap01717"
Network address...... "10.61.89.105"
Operating system..... "Linux"
Release.............. "2.6.40-0.8-default"
Hardware type........ "x86_64"
Character length.... 16 Bits
Pointer length....... 64 Bits
Work process number.. 15
Shortdump setting.... "full"
Database server... "sap01716"
Database type..... "ORACLE"
Database name..... "QWT"
Database user ID.. "SAPDAT"
Terminal................. "10.61.31.114"
Char.set.... "C"
SAP kernel....... 720
created (date)... "Mar 17 2013 18:46:25"
create on........ "Linux GNU SLES-11 x86_64 cc4.3.4 use-pr121116"
Database version. "OCI_102, 11.2.0.3.0, V1, default"
Patch level. 420
Patch text.. " "
Database............. "ORACLE 10.1.0.*.*, ORACLE 10.2.0.*.*, ORACLE 11.2.*.*.*"
SAP database version. 720
Operating system..... "Linux 2.6, Linux 3"
Memory consumption
Roll.... 0
EM...... 16759232
Heap.... 0
Page.... 16384
MM Used. 14978448
MM Free. 1777544
User and Transaction
Client.............. 500
User................ "RFC_TAULIA"
Language Key........ "E"
Transaction......... " "
Transactions ID..... "53F6515E320E5BBBE10000000A3D5969"
Program............. "SAPLCEI0"
Screen.............. "SAPMSSY1 3004"
Screen Line......... 2
Information on caller of Remote Function Call (RFC):
System.............. "########"
Database Release.... 720
Kernel Release...... 720
Connection Type..... "E" (2=R/2, 3=ABAP System, E=Ext., R=Reg. Ext.)
Call Type........... "synchronous and non-transactional (emode 0, imode 0)"
Inbound TID.........." "
Inbound Queue Name..." "
Outbound TID........." "
Outbound Queue Name.." "
Client.............. "###"
User................ "############"
Transaction......... " "
Call Program........."SAPJCo30"
Function Module..... "/TAULIA/CT_RFC_BUS_DOC_GET"
Call Destination.... "SAPR3"
Source Server....... "SWDETDOLPHPODD"
Source IP Address... "10.61.31.114"
Additional information on RFC logon:
Trusted Relationship " "
Logon Return Code... 0
Trusted Return Code. 0
Note: For releases < 4.0, information on the RFC caller are often
only partially available.
Information on where terminated
Termination occurred in the ABAP program "SAPLCEI0" - in
"VC_I_GET_CONFIGURATION".
The main program was "SAPMSSY1 ".
In the source code you have the termination point in line 259
of the (Include) program "LCEI0U30".Hi Arun,
the exception INTERNAL_ERROR of function module VC_I_GET_CONFIGURATION hasn't been caught, which leads to a short dump.
Check, where INTERNAL_ERROR is raised in your system In our system the only remaining code is after call of function module CUCQ_GET_CONFIGURATION_PARAMS.
Please try to debug, why this exception is raised.
Regards,
Klaus -
No storage space available for extending an internal table.
Hi All,
I am using Function Module : VC_I_GET_CONFIGURATION in FI related Sales Order Report to get
configuration data for fields Model/Engine and Line no.
when the program executed in Production environment, It is giving Runtime Error TSV_TNEW_PAGE_ALLOC_FAILED.
ShrtText : No storage space available for extending an internal table.
The termination occurred in the ABAP program "SAPLIBINF" in "SELECT_INSTANCES_01" . its all happening
in the above FM.
Is there any possibility to get configuration data (Model/Engine and Line no) with out using FM.
please advise me on how you would like to proceed related to this issue.
Thanks & Regards
Satish ReddyHi Satish,
Please go through the below links and see if you can use this to address your issue,
http://wiki.sdn.sap.com/wiki/display/ABAP/ReplacementofVC_I_GET_CONFIGURATIONforperfomance+tunning
VC_I_GET_CONFIGURATION and paging memory
Regards,
Chen
Edited by: Chen K V on May 26, 2011 2:34 PM -
How can I get customer classification characteristics?
Lots of examples in SDN on materials but very limited on customers for this.
I have a functional spec that says to get the user ID I must "take the ZANALYST characteristic of the class ZDEDUCTION on the customer master record".
Okay so the "Z" values are unique values we are using here at the client's site.
I have found that I need to use the FM 'CLAF_CLASSIFICATION_OF_OBJECTS' but how and what to pass is greek to me.
One link here says to "Use CLAF_CLASSIFICATION_OF_OBJECTS. Pass the customer number (internal format) to Object Id, and the KLART value, you will get the values.".
What is meant by the internal format of the customer number and where do I get this?
What is the KLART value?
I know this FM is used for material characteristics but how do I tell it this is for customer characteristics?
What customer tables (tables not structures!) have the values I need to determine
the values required to pass to this FM? Can I start with KNA1, KNB1, etc?
If any one has sample code on how this is used - I will ensure you get max points!
Thanks!
ScottHi,
Try to use fm VC_I_GET_CONFIGURATION. (This is for object you want to read is configurable (Class types 200, 201, 300). all others use BAPI_OBJCL_GETDETAIL.
if above not possible
I think
Object table comes from TCLA-OTAB. and your class type TCLA-KLART drives it.
I think for every class there will be unique entry in TCLA based on your class type select the TCLA-OTAB
May this will help you
aRs -
Need to set values in the configurator
Hi people,
Im a workflow consultant and need a bit of advice regarding updating the configurator values. I know about the function module "vc_i_get_configuration" gets the values in the configurator and the parameter for that would be cuobj. But is there any function module in place which updates the configurator with new values from a custom screen. This custom screen is going to be in the workflow.
Regards,
Sukumar.yes you can update values, you can use class CL_CBASE.
EXAMPLE PROGRAM:
TYPE-POOLS:
cucbt,
ibxx,
ibco2.
PARAMETERS : p_cuobj TYPE cuib_cuobj.
DATA: add_chr TYPE ibco2_value_tab,
l1_ind LIKE sy-tabix.
DATA: old_l TYPE i,
new_l TYPE i.
DATA: wa_chr LIKE ibvalue0,
wa_chr1 LIKE ibvalue0,
wa_con TYPE ibco2_instance_rec2.
DATA: l_obj TYPE REF TO cl_cbase.
CLEAR l_obj.
DATA: it_instances TYPE cuib_cuobj_tab.
DATA: l_head TYPE ibco2_ibase_rec,
l_config TYPE ibco2_instance_tab2.
DATA: wa_instances LIKE LINE OF it_instances.
CLEAR wa_instances.
APPEND wa_instances TO it_instances.
DATA: flg_invalid TYPE c.
CLEAR flg_invalid.
CALL METHOD cl_cbase=>get_current_cbase_by_instance
EXPORTING
iv_instance = p_coubj
iv_check_only_buffer = space
IMPORTING
eo_cbase = l_obj
ev_instance_is_invalid = flg_invalid.
CALL METHOD l_obj->get_configuration
IMPORTING
es_cbase_head = l_head
et_instances = l_config.
DATA: c_ind LIKE sy-tabix.
CLEAR add_chr.CLEAR l1_ind.CLEAR wa_chr.
LOOP AT l_config INTO wa_con.
l1_ind = sy-tabix.
add_chr = wa_con-values.
LOOP AT add_chr INTO wa_chr WHERE atinn EQ '0000000019'.
wa_chr-atwrt = '000000000000000504'.
MODIFY add_chr FROM wa_chr.
ENDLOOP.
wa_con-values = add_chr.
MODIFY l_config FROM wa_con INDEX l1_ind.
ENDLOOP.
DATA: lcfg_head TYPE ibibconf.
CLEAR lcfg_head.
CALL METHOD l_obj->get_head_of_cfg
IMPORTING
es_head_cfg = lcfg_head.
CALL METHOD l_obj->set_configuration
EXPORTING
is_head_cfg = lcfg_head
CHANGING
ct_instances = l_config.
CALL METHOD l_obj->set_mark_for_saving.
CALL METHOD l_obj->save_and_free.
COMMIT WORK AND WAIT.
MESSAGE e398(00) WITH 'Configuration Updated'.
WRITE:/ 'Detail of changes'.
SKIP.
LOOP AT add_chr INTO wa_chr.
WRITE:/ wa_chr-atinn, wa_chr-atwrt, wa_chr-atcod.
ENDLOOP.
Message was edited by: Sharath kumar R
Maybe you are looking for
-
Framerate problems playing HD in fullscreen.
I am watching an HD video purchased from the iTunes store. The video plays perfectly (both within iTunes or with Quicktime Player directly) at actual-size. However, if I put the video in Fullscreen mode in either player, the video becomes choppy, esp
-
Photoshop CS4 crashes with Filemaker Pro 8.5 open
Normally, continuous crashes in a new Adobe application results in a fairly quick fix in the form of an update. I let the application report the error codes via the automated submission process. However, I have had this problem for months now without
-
Unable to complete step 2 (drag icon into applications folder) when upgrading Firefox
I am trying to upgrade from Firefox 3.6.11 to 3.6.12. Step 2 of the process says "Drag the Firefox icon into your applications icon. First problem: I don't have an applications icon. Second problem, being creative I open Finder on my Mac and try to d
-
I recently purchased a Nokis Asha 201 using PAYG/Orange simcard, everything is working fine except the following:- Mail - When selecting "accept" to accept terms & privacy policy then searches for "mail service updates" but just continuously searche
-
My LOST iPhone4 is offline and apparently, inadvertently turned off. Can it be turned on remotely so that I can uilize "Find my iPhone"? I have the serial #, and phone #, and Verizon is my carrier.