Error 0007
Error 0007
so, how did it go in the end for both of you?
The search box on top-right of this page is your true friend, and the public Knowledge Base too:
Similar Messages
-
Since the first time I try to download a larger app it gave me this error. I've try to upgrade Need for speed app and it gave me Install error 0007. Initially I thought it was the app but it's all apps which are larger then 200-300M.The small app is no problem. What do I need to do?Thank you in advance for your help.
Try the three button reset. Hold down the Power Button and both volume buttons at the same time for 15 seconds and then wait 1 minute then hold the power button only until the red light flashes then release it and wait for the PB to reboot which will be about 4 minutes. Try downloading Need for Speed again.
-
I have read all the posts relating to the Update error 0007, I updated my Paypal details as advised, but still I am unable to download or update any of the big applications, r.e. Modern Combat. I am very disappointed that none of the BB technical staff are able to give constructive advise to solve this problem!!!! Please can someone help as this is quite frustrating? I have updated to the latest OS 2.0.1.358 and since then I have had this problem.
Thank you very much for the feedback, at this stage anything is more helpfull than the support I am getting from the BB guys. Just 2 questions: 1. what in terms of applications and data will I lose if i wipe my playbook, I do not want through the lenghty installation process again just to have the same problem again. 2. How do I wipe my playbook?
I cannot believe I must resort to this action to solve the problem and in the mean time the BB guys have nothing to add!!!! -
Error 0007 while downloading Gameloft Star Front on Playbook
I am trying to download Gameloft's Star Front for the playbook. I have paid for it, however every time i reach around 300-400 megs, the download fails with error 0007. I have wasted almost 1.5 gigs trying to download this now and it has failed 4 times now. Please help, what is this error?
so, how did it go in the end for both of you?
The search box on top-right of this page is your true friend, and the public Knowledge Base too: -
Install Error 0007 (whatever that means...)
I have purchased Modern Combat 3 and when I start to download I keep getting an Error Code 0007. Sometimes it has downloaded a lot, sometimes a little.
First of all, this is a dumb error message. It doesn't tell me what the problem is. You really need to fix that.
I've been wasting time all day long trying to figure out what's going on. Clearing out space, rebooting, rebooting my router, etc. This is rather ridiculous...Hey jr4941,
Welcome to the BlackBerry Support Community Forums.
Thanks for the question.
This error can be caused by low memory on the BlackBerry® PlayBook™ tablet . Follow the steps below to check your free memory:
On the top right corner of the home screen, click the Options cog.
Click About in the left menu.
Select Hardware from the View information about your tablet drop down.
Check the Free Storage value.
If this value is very low, like 1 MB, then connect the BlackBerry PlayBook to a computer and move multimedia files off like Voice Notes, Videos, Music, Documents, etc.
Let me know if you have any more questions.
Cheers.
-ViciousFerret
Come follow your BlackBerry Technical Team on Twitter! @BlackBerryHelp
Be sure to click Like! for those who have helped you.
Click Accept as Solution for posts that have solved your issue(s)! -
Error when create Infotype 0007-Planned Working Time of Personnel data
Hi Experts,
I'm creating Infotype 0007-Planned Working Time for Personnel data then having a error below.( I created Work schedule rule and Gennerated it).
Feature structure cannot be recognized, please see documentation
Message no. P0568
Diagnosis
Cause 1:
The structure of the feature is not saved in the feature directory.
Cause 2:
The feature structure is not defined in the program that reads the feature.
Cause 3:
The feature that the program expects does not match the actual feature structure.
Procedure
Cause 1:
Please advise your system administrator that all features must be regenerated. Please note that this generation must take place in client 000 first, and then in all other clients (report RPUMKF00 or the Generation function in the feature maintenance transaction (transaction PE03)).
Cause 2:
The feature structure must always be defined in the program reading the feature (see documentation for program RPUMKC00).
Cause 3:
Please contact your system administrator
I did using T.Code PE03 in Client 000 but I don't know what is Features?
Please tell me how solves it ?
Thanks so much.
Dungnvinfotype 0007 reads two features
SCHKZ - Default value for Shift indicator
TMSTA DEFAULT VALUE FOR TIME MANAGEMENT STATUS
Please have a look at both these features -
Getting "Can not open the file due to unknown error(FRM:0007)"
Getting "Can not open the file due to unknown error(FRM:0007)", when refreshing the local copy of Deski report from user docs.
Any assistance
Thanks,
Sasi.Hi Sasi,
One of the reason for this error is corrupted universe.So you can try following steps and restore copy of universe and then try to import this universe and check whether it works.
1.While importing a universe, a temp file is created in the users local settings temp directory.
2. For example C:\Documents and Settings\brijones\Local Settings\Temp\0dd0b0a7 .
3. File has no extension is relatively the same size as the original universe file.
4.Rename this file to original universe name.
I hope it helps.
Regards,
Snehal -
Error Detail
Exception CX_DBA_ADBC in program RAGS_SISE_ACTIVITY_JOB line 0
Kernel Error ID:
WP ID: 23
WP PID: 28977
SYSID: CR5
SY-SUBRC: 0
SQL statement:
Database: CR5
caused by
Exception CX_SQL_EXCEPTION in class CL_SQL_STATEMENT
Kernel Error ID:
DB Error: Yes
SQL Code: 444-
SQL Message: SQL0444N Routine "*TASK_ADD" (specific name "SQL140704080729140") is implemented with code in library or path "...ib/function/SYSPROC.ADMIN_TASK_ADD", function "*" which cannot be accessed. Reason code: "4". SQLSTATE=42724 row=1
DB Object Exists: No
Duplicated Key: No
Internal Error: 1
Invalid Cursor: No
Unknown Connection: No
Connection Closed: No
System Detail:
Solman 7.1
ST 710 0010 SAPKITL710 SAP Solution Manager Tool
SAP_BASIS 702 0013 SAPKB70213 SAP Basis Component
Managed system:
SAP CRM ABAP 7.0
SAP_BASIS 701 0005 SAPKB70105 SAP Basis Component
SAP_ABA 701 0005 SAPKA70105 Cross-Application Component
PI_BASIS 701 0005 SAPK-70105INPIBASIS Basis Plug-In
ST-PI 2008_1_700 0008 SAPKITLRD8 SAP Solution Tools Plug-In
CRMLOY 700 0005 SAPK-70005INCRMLOY CRM Loyalty Management 700
SAP_BS_FND 701 0005 SAPK-70105INSAPBSFND SAP Business Suite Foundation
SAP_BW 701 0005 SAPKW70105 SAP Business Warehouse
LCAPPS 2005_700 0007 SAPKIBHD07 LC Applications (LCAPPS) 2005_700
Database DB2
db2level
DB21085I Instance "db2cr5" uses "64" bits and DB2 code release "SQL09016" with
level identifier "01070107".
Informational tokens are "DB2 v9.1.0.6", "s081007", "U817474", and Fix Pack
"6".
Activity detail:
We are performing managed system configuration for CRM into Solman by using solman_setup transaction. While performing the Database Extractor Setup in step 8 we have observed above error.
Action take at our end:
1. Clean the LMDB and restart the configuration. - no luck
2. Upgrade the hostagent at CRM - No luck
3. Update the SLD for CRM entry - no luck
4. implemented SAP notes:
875986 Note Assistant: Important notes for SAP_BASIS up to 702
1246964 Note Assistant: Master language of notes incorrect
1262653 SPAU: New object is deleted after note is reset
1309424 DB6: DBA Cockpit Correction Collection SAP Basis 7.01 / 7.11
1335017 DB6:"Remove Redundant Restrictions" can return wrong results
1349277 Note Assistant: Method cannot be implemented
1365677 Note Assistant: Runtime error MOVE_CAST_ERROR during implmtn
1372652 DB6: Short dump when viewing diaglog due to NULL bytes
1373957 DB6: CX_SY_CONVERSION_OVERFLOW in new EXPLAIN
1376543 DB6: OPTIONS parameters for backup jobs in DB13
1378499 DB6: CLI error CLI0112E with "REORGCK_ALL" job
1379260 DB6: Add BW query name as comment to SQL statements
1379346 DB6: Scheduling of data collectors fails
1381179 DB6: Incorrect values for 'number of objects in tablespace'
1382634 DB6: Unable to create view 'SAPTOOLS.DBH_TABCLASS'
1382996 DB6: Update of DPW Back-End in Monitored DBs does not work
1384238 DB6: Defect scheduler on DB2 9.1 FP7/FP8 for LUW on Linux
1387022 DBA Cockpit: Month displayed incorrectly in DB13C
1387297 DB6: SQL-Fehler 901 during RUNSTATS and REORGCHK
1397709 Ignore Dynpro element fields AGLT and ADEZ in SNOTE/CWB
1398258 DB6: Job REORGCK_ALL places load on package cache
1400843 DB6: Incorrect display of key fields in EXPLAIN
1412719 SNOTE: error when implementing enhancement implementations
1413008 DB6: SQL0206N in function module DB6_PM_LOCKSNAP
1414624 DB6: Performance views if database monitors are deactivated
1414626 DB6: Incorrect display of file system sizes of containers
1415680 Note Assistant: Incorrect status in subsequent systems
1421157 DB6: SQL error 204 when accessing table DBSTATC
1425487 SE24: Error regarding READ-ONLY for complex attributes
1426092 DB6: Incorrect DROPPED TABLE clause for tablespaces
1426480 DB2: Incorrect display of registry values for DPF systems
1427030 DB6: Container specifications for tablespaces not changeable
1429082 DB6: No REORG after deactivating compression
1429687 DB6: SQL cache performance
1438168 DB6: REORGCHK recommendations for indexes are missing
1444373 DB6: Loading the package cache with monitor functions
1449482 DB6: Error message 'Command LIST_DB2DUMP failed'
1451958 DBA Cockpit: Incorrect start time for jobs
1452197 DB6: SQL error 100 in job REORGCK_ALL
1452502 DBA Cockpit: Jobs are missing in central planning calendar
1455897 DB6: Display of data classes is not updated
1456379 DB6: No display of indexes in data classes
1460895 DB6: SQL0104N during creation of WLM threshold
1462415 DB6: SQL -444 error messages in system log
1462855 DB6: Incorrect database name in HA environment
1464800 DB6: SQL Commands executes automatically on system change
1464858 DB6: COMPUTE_BCD_OVERFLOW during EXPLAIN Test Execute
1469515 DB6: Runtime error GETWA_NOT_ASSIGNED_RANGE in SAPLSDB6MON
1485313 DBA Cockpit: Incomplete system entries after SLD import
1486972 DB6: Parameters for DB/DBM configuration cannot be changed
1489968 DBA: DBA Cockpit WebDynpro does not care about HTTPURLLOC
1496515 DB6: SQL error 1428N when starting the DBA Cockpit
1501130 DB6: SQL error 802 in DB6_DIAG_COUNT_TABLE_ENTRIES
1508074 RZ20: 'Connection' attribute does not report alerts
1509121 DBA Cockpit: Endless loop occurs when starting DBA Cockpit
1511803 DB6: DB_TABLE_DATA_READ does not return data
1521525 DB6: Table display is not sorted
1522617 DB6: Availability of BW-specific functions in DBA Cockpit
1532114 DB6: Too many locks when collecting table history
1536787 DBA Cockpit: WebDynpro Explain - LOADDATA requires a model
1542311 DB6: Runtime error BCD_OVERFLOW in auto maintenance display
1546866 DB6: Runstats_DBSTATC interprets runtime param. incorrectly
1551729 DB6: Incorrect number of key fields in EXPLAIN
1552812 DB6: Use of db2sap functions
1559699 DB6: Missing data in SQL cache display
1559967 DB6: SQL error 206 when collecting the table history
1563327 DB6: SQL error SQL0551N when accessing SYSSTAT.TABLES
1568800 DB6: Error when deleting alert messages
1569592 DB6: SQL error SQL0433N in EXPLAIN
1569669 DB6: Incomplete history for performance data
1571365 DB6: SQL error SQL0443N in alert monitoring of DPF system
1576094 DB6: Database error SQL1751N in partitioning wizard
1597281 DB6: Incorrect compression displays for tables
1599764 DB6: SQL error 1428 when calling transaction SM50
1602403 DB6: No VOLATILE attribute after RUNSTATS or REORG job
1613270 DB6: Runtime error DYNPRO_FIELD_CONVERSION in DBA cockpit
1615698 DBA Cockpit: Incorrect date selection in DB13C
1619084 DBA Cockpit: Runtime err MESSAGE_TYPE_X when alert displayed
1619636 DBA Cockpit: Daily scheduling is not deleted
1624436 DBA Cockpit: Errors when accessing SHM area CL_DBA_SHM_AREA
1639631 DBA Cockpit: Failed schedulings in DB13
1720495 Invalid deimplementation of obsolete notes by Snote tool
Kindly suggest the correct solution to fix the issue.Dear Deepak
Thanks for quick response.
Note 1462415 - DB6: SQL -444 error messages in system log ( SAP_BW 701 SP7 suggested)
This is already implemented and updated in my 1st message.
Note 978319 - DB6: Incorrectly cataloged table functions
This note can not be implemented due to version issue.
Kindly suggest some more hints on top of what I already did.
Regards
Bipin -
Error in Bapi_GoodsMvt_Create using Purchase order
Hi Friends,
I am using Bapi_goodsmvt_create for Goods Receipts against Purchase order.
The below code i have given for Goods receipts
It shows the error like
ID : 8J
Err No.:182
Message : Entry 4500000344 00040 0000 not valid; correct entry
Please help me to correct this error.
Thanks
Shankar
===================================
Heading Structure
st_gm_code-gm_code = '01'.
st_gm_header-pstng_date = '20070930'.
st_gm_header-doc_date = '20070930'.
st_gm_header-gr_gi_slip_no = '970015'.
st_gm_header-bill_of_lading = '527213'.
st_gm_header-header_txt = 'AIR'.
st_gm_header-ref_doc_no = '4500000344'.
Tables - ITEM CREATE.
itab_afs_gm_itemx-plant = '2000'.
itab_afs_gm_itemx-deliv_numb = '80100121'.
itab_afs_gm_itemx-stge_loc = '2110'.
itab_afs_gm_itemx-move_stloc = '2110'.
itab_afs_gm_itemx-po_number = '4500000344'.
itab_afs_gm_itemx-po_item = '00040'.
itab_afs_gm_itemx-vendor = '0000650003'.
itab_afs_gm_itemx-vendrbatch = 'ABC123'.
itab_afs_gm_itemx-move_type = '101'.
itab_afs_gm_itemx-mvt_ind = 'B'.
itab_afs_gm_itemx-material = '000000000030000227'.
itab_afs_gm_itemx-entry_qnt = 10.
APPEND itab_afs_gm_itemx .
****&& Grid values
gr_afs-matdoc_itm = '0001'.
gr_afs-grid_value = '205'.
gr_afs-withdrawn_sku = 'X'. "Final issue at sku level
gr_afs-stock_cat = '0000000001000366'.
APPEND gr_afs.
CALL FUNCTION 'BAPI_GOODSMVT_CREATE'
EXPORTING
goodsmvt_header = st_gm_header
goodsmvt_code = st_gm_code
TESTRUN = ' '
IMPORTING
goodsmvt_headret = st_gm_headret
materialdocument = mat_doc
matdocumentyear = doc_year
TABLES
goodsmvt_item = itab_afs_gm_itemx
afs_goodsmvt_sku = gr_afs
return = bapi_return.
IF sy-subrc = 0.
CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'
EXPORTING
wait = 'X'.
ENDIF.
CLEAR itab_afs_gm_itemx.
REFRESH itab_afs_gm_itemx.
CLEAR gr_afs.
REFRESH gr_afs.Hi,
Here is some sample code from one of my programs, which does a 551 movement type. This should get you started. Just check the RETURN table for messages, they should tell you what you are missing.
code
Structures for BAPI
data: gm_header type bapi2017_gm_head_01.
data: gm_code type bapi2017_gm_code.
data: gm_headret type bapi2017_gm_head_ret.
data: gm_item type table of
bapi2017_gm_item_create with header line.
data: gm_return type bapiret2 occurs 0.
data: gm_retmtd type bapi2017_gm_head_ret-mat_doc.
clear: gm_return, gm_retmtd. refresh gm_return.
Setup BAPI header data.
gm_header-pstng_date = sy-datum.
gm_header-doc_date = sy-datum.
gm_code-gm_code = '06'. " MB11
Write 551 movement to table
clear gm_item.
move '551' to gm_item-move_type .
move '000000000040001234' to gm_item-material.
move '1' to gm_item-entry_qnt.
move 'EA' to gm_item-entry_uom.
move '0004' to gm_item-plant.
move '4000' to gm_item-stge_loc.
move '201' to gm_item-move_reas.
Determine cost center per plant
case xresb-werks.
when '0004'.
move '0000041430' to gm_item-costcenter.
when '0006'.
move '0000041630' to gm_item-costcenter.
when '0007'.
move '0000041731' to gm_item-costcenter.
when '0008'.
move '0000041830' to gm_item-costcenter.
endcase.
append gm_item.
Call goods movement BAPI
call function 'BAPI_GOODSMVT_CREATE'
exporting
goodsmvt_header = gm_header
goodsmvt_code = gm_code
importing
goodsmvt_headret = gm_headret
materialdocument = gm_retmtd
tables
goodsmvt_item = gm_item
return = gm_return.
call function 'BAPI_TRANSACTION_COMMIT'
exporting
wait = 'X'.
[/code]
Welcome to SDN! Please remember to award points for helpful answers and mark you post as solved when solved completely. Thanks.
REgards,
Raj. -
Getting error COMPUTE_INT_TIMES_OVERFLOW in GUI_DOWNLOAD
Hi Experts,
I am using server SRM 7.0
and support package is SAP_ABA 701 0007 SAPKA70107 Cross-Application Component
I am getting dump in GUI_DOWNLOAD Function module
This is ST22
In the current program "SAPLSFES", multiplying the numbers 21550 and
131070 (using the operation '*' or 'MULTIPLY') resulted in a value
greater than 2147483647 or smaller than -2147483648. This
results in a whole number overflow.
Runtime Errors COMPUTE_INT_TIMES_OVERFLOW
Except. CX_SY_ARITHMETIC_OVERFLOW
Trigger Location of Exception
Program SAPLSFES
Include LSFESU17
Row 517
Module type (FORM)
Module Name MASS_DOWNLOAD
and its coming because of this
514 if prc_filetype = 'BIN' and bin_filesize ne 0.
515 tablesize = bin_filesize.
516 else.
>>>>> tablesize = lines * record_length.
518 binfilesize_lcl = tablesize.
519 endif.
Please tell me is there any Patch or note for it .
Thanks & Regards
Prashant GutaHi Rogério Ribeiro,
Thanks for Reply .
I can not reduce file because i am downloading Web Dynpro component by the download prgram given in Sap Link.
so Web Dynpro component is big thats why prblem is coming .
Thanks & Regards
Prashant Gupta -
Sap-nw:3300 not reached error in gateway
Dear experts,
I am facing a strange problem after a successful installation of netweaver Java+abap.
when i start the server i found this error
**** ERROR file opened at 20100131 114242 Arab Standard T, SAP-REL 700,0,113 RFC-VER 3 911150 MT-SL
T:2844 Error in program 'igsmux': ======> CPIC-CALL: 'SAP_CMNOREGTP'
LOCATION CPIC (TCP/IP) on local host
ERROR partner 'sap-nw:3300' not reached
TIME Sun Jan 31 11:42:42 2010
RELEASE 700
COMPONENT NI (network interface)
VERSION 38
RC -10
MODULE nixxi.cpp
LINE 2770
DETAIL NiPConnect2
SYSTEM CALL connect
ERRNO 10061
ERRNO TEXT WSAECONNREFUSED: Connection refused
COUNTER 1
i ignore the error and i tried to login
after successful login to the portal server when i access the user administration tab. the explorer show
SAP WebAS Engine is starting...
If this state does not change within a few minutes,
please contact your system administrator.
Check the recommendations in SAP Notes: 943498, 764417
Message: Dispatcher running but no server connected!
and the server turns to yellow again when it turns to green again
i checked dev_rd
Sun Jan 31 13:11:15 2010
***LOG Q0I=> NiIRead: recv (10054: WSAECONNRESET: Connection reset by peer) [nixxi.cpp 4424]
*** ERROR => NiIRead: SiRecv failed for hdl 9 / sock 268
(SI_ECONN_BROKEN/10054; I4; ST; 127.0.0.1:1205) [nixxi.cpp 4424]
***LOG Q0I=> NiIRead: recv (10054: WSAECONNRESET: Connection reset by peer) [nixxi.cpp 4424]
*** ERROR => NiIRead: SiRecv failed for hdl 6 / sock 304
(SI_ECONN_BROKEN/10054; I4; ST; 127.0.0.1:1148) [nixxi.cpp 4424]
***LOG S23=> GwIDisconnectClient, client disconnected (006) [gwxxrd.c 11592]
***LOG S74=> GwIDisconnectClient, client disconnected ( sap-nw) [gwxxrd.c 11603]
***LOG S0R=> GwIDisconnectClient, client disconnected () [gwxxrd.c 11638]
***LOG S0I=> GwIDisconnectClient, client disconnected ( jlaunch) [gwxxrd.c 11651]
* LOCATION SAP-Gateway on host sap-nw / sapgw00
* ERROR connection to partner 'sap-nw:1148' broken
* TIME Sun Jan 31 13:11:15 2010
* RELEASE 700
* COMPONENT NI (network interface)
* VERSION 38
* RC -6
* MODULE nixxi.cpp
* LINE 4424
* DETAIL NiIRead
* SYSTEM CALL recv
* ERRNO 10054
* ERRNO TEXT WSAECONNRESET: Connection reset by peer
* COUNTER 232
***LOG Q0I=> NiIRead: recv (10054: WSAECONNRESET: Connection reset by peer) [nixxi.cpp 4424]
*** ERROR => NiIRead: SiRecv failed for hdl 10 / sock 256
(SI_ECONN_BROKEN/10054; I4; ST; 127.0.0.1:1206) [nixxi.cpp 4424]
***LOG Q0I=> NiIRead: recv (10054: WSAECONNRESET: Connection reset by peer) [nixxi.cpp 4424]
*** ERROR => NiIRead: SiRecv failed for hdl 11 / sock 244
(SI_ECONN_BROKEN/10054; I4; ST; 127.0.0.1:1208) [nixxi.cpp 4424]
***LOG Q0I=> NiIRead: recv (10054: WSAECONNRESET: Connection reset by peer) [nixxi.cpp 4424]
*** ERROR => NiIRead: SiRecv failed for hdl 12 / sock 232
(SI_ECONN_BROKEN/10054; I4; ST; 127.0.0.1:1207) [nixxi.cpp 4424]
then i try to login again with the browser it give me
Portal Runtime Error
An exception occurred while processing your request
Exception id: 01:27_31/01/10_6192950
See the details for the exception ID in the log file.
any help would be appreciated
<br>
i also wanted to add that telnet 3300 works fine ping to host name is ok
my os win2003 sap 2004s sr3
Edited by: ebrahime on Jan 31, 2010 11:37 AMthanks for your reply. i wanted to add 2 thing after the installation the password i entered in installation was not working for all the super users that is why i had to delete SAP* from database and change the j2ee_Admin password.
you mentioned that the java stack is unable to communicate with abap stack but i can login to portal by j2ee_admin user. but when i go to identity management then it give the error i gave you earlier.
any way the dev_w0 file contents is bellow
trc file: "dev_w0", trc level: 1, release: "700"
ACTIVE TRACE LEVEL 1
ACTIVE TRACE COMPONENTS all, MJ
B
B Tue Feb 02 10:23:01 2010
B create_con (con_name=R/3)
B Loading DB library 'F:\usr\sap\ENP\DVEBMGS00\exe\dbdb6slib.dll' ...
B Library 'F:\usr\sap\ENP\DVEBMGS00\exe\dbdb6slib.dll' loaded
B Version of 'F:\usr\sap\ENP\DVEBMGS00\exe\dbdb6slib.dll' is "700.08", patchlevel (0.144)
C DbSl trace SM50: switch request to level 1
B New connection 0 created
M sysno 00
M sid ENP
M systemid 562 (PC with Windows NT)
M relno 7000
M patchlevel 0
M patchno 144
M intno 20050900
M make: multithreaded, Unicode, 64 bit, optimized
M pid 1604
M
M kernel runs with dp version 232000(ext=109000) (@(#) DPLIB-INT-VERSION-232000-UC)
M length of sys_adm_ext is 576 bytes
M ***LOG Q0Q=> tskh_init, WPStart (Workproc 0 1604) [dpxxdisp.c 1305]
I MtxInit: 30000 0 0
M DpSysAdmExtCreate: ABAP is active
M DpSysAdmExtCreate: VMC (JAVA VM in WP) is not active
M DpShMCreate: sizeof(wp_adm) 25168 (1480)
M DpShMCreate: sizeof(tm_adm) 5652128 (28120)
M DpShMCreate: sizeof(wp_ca_adm) 24000 (80)
M DpShMCreate: sizeof(appc_ca_adm) 8000 (80)
M DpCommTableSize: max/headSize/ftSize/tableSize=500/16/552064/552080
M DpShMCreate: sizeof(comm_adm) 552080 (1088)
M DpSlockTableSize: max/headSize/ftSize/fiSize/tableSize=0/0/0/0/0
M DpShMCreate: sizeof(slock_adm) 0 (104)
M DpFileTableSize: max/headSize/ftSize/tableSize=0/0/0/0
M DpShMCreate: sizeof(file_adm) 0 (72)
M DpShMCreate: sizeof(vmc_adm) 0 (1864)
M DpShMCreate: sizeof(wall_adm) (41664/36752/64/192)
M DpShMCreate: sizeof(gw_adm) 48
M DpShMCreate: SHM_DP_ADM_KEY (addr: 0000000010E70050, size: 6348592)
M DpShMCreate: allocated sys_adm at 0000000010E70050
M DpShMCreate: allocated wp_adm at 0000000010E72150
M DpShMCreate: allocated tm_adm_list at 0000000010E783A0
M DpShMCreate: allocated tm_adm at 0000000010E78400
M DpShMCreate: allocated wp_ca_adm at 00000000113DC2A0
M DpShMCreate: allocated appc_ca_adm at 00000000113E2060
M DpShMCreate: allocated comm_adm at 00000000113E3FA0
M DpShMCreate: system runs without slock table
M DpShMCreate: system runs without file table
M DpShMCreate: allocated vmc_adm_list at 000000001146AC30
M DpShMCreate: allocated gw_adm at 000000001146ACB0
M DpShMCreate: system runs without vmc_adm
M DpShMCreate: allocated ca_info at 000000001146ACE0
M DpShMCreate: allocated wall_adm at 000000001146ACF0
M ThTaskStatus: rdisp/reset_online_during_debug 0
X EmInit: MmSetImplementation( 2 ).
X MM global diagnostic options set: 0
X <ES> client 0 initializing ....
X Using implementation view
X <EsNT> Using memory model view.
M <EsNT> Memory Reset disabled as NT default
X ES initialized.
M
M Tue Feb 02 10:23:02 2010
M ThInit: running on host ENP
M
M Tue Feb 02 10:23:03 2010
M calling db_connect ...
C Registering callback for dynamic profile parameters
C DB2 library successfully loaded DB2 library 'F:\usr\sap\ENP\DVEBMGS00\exe/db6_clidriver\bin\db2app64.dll' successfully loaded
C
C DB6 (DB2 UDB) UNICODE database interface 700.08 [opt]
C
C DB6 shared library (dbdb6slib) patchlevels
C (0.8) DB6: V8.2.2 optguidelines in OPEN SQL (note 150037)
C (0.8) Support of SDBUPDEXCL (note 847616)
C (0.9) DB6: use export file for dbdb6slib (note 835135)
C (0.9) DB6: Core in getAndBindSQLDA (note 833183)
C (0.10) DB6: link dbdb6slib.dll on windows with libdb6.obj (note 761159)
C (0.10) DB6: DUPLICATE_KEY on MERGE -> repeat (note 851474)
C (0.15) DB6: wrong CAST for short string ABAP type (note 861905)
C (0.17) DB6: special characters in sidadm passwd (note 865839)
C (0.21) DB6: no SAP_INFO comments (note 873889)
C (0.22) DB6: hints: get correlation names from view texts (note 868888)
C (0.23) DB6: hints: get correlation names from view texts (note 868888)
C (0.26) DB6: DB6_DBSL_CLP_COMMAND STRING_BAD_REF (note 883402)
C (0.27) DB6: activate value compression (note 886231)
C (0.28) DB6: optimization guidelines on views part 2 (note 868888)
C (0.30) DB6: no SQL trace for SQLCancel (note 892111)
C (0.33) DB6: append SAP_TA comment (note 873889)
C (0.34) DB6: activate value compression with quoted names (note 886231)
C (0.36) DB6: Repeat isolated DDL statements after SQL0911 (note 901338)
C (0.41) DB6: add V9 to list of supported DB2 releases (note 912386)
C (0.50) DB6: reread passwords for secondary connections (note 931742)
C (0.52) DB6: double quote table names in optguidelines (note 868888)
C (0.54) DB6: error handling in DBSL CLP (note 940260)
C (0.69) DB6: technical support of DB2 CLI driver (note 962892)
C (0.73) DB6: log table name on TRUNCATE failure (note 970743)
C (0.79) DB6: column type XML in index size calculation (note 982993)
C (0.82) DB6: CAST for SSTRING data types (note 989568)
C (0.86) DB6: long runtimes for R3szchk (note 1000847)
C (0.88) DB6: patch collection Dec 06 (note 1005574)
C (0.96) DB6: patch collection Jan 07 (note 1017852)
C (0.97) DB6: CLP commands with DB2 CLI Driver (note 1024102)
C (0.99) DB6: SUBSTITUTE VALUES with FAE statements (note 1028779)
C (0.107) DB6: patch collection Apr 07 (note 1047194)
C (0.110) DB6: SAP user names ending with non-ASCII char (note 1054555)
C (0.113) DB6: work process type in application snapshot (note 1059905)
C (0.114) DB6: connect using SAPDBHOST and DB2DB6_SVCENAME (note 1062049)
C (0.117) DB6: patch for execution of long DDL statements (note 1069658)
C (0.122) DB6: SNAPSHOT_TBS_CFG table function is deprecated (note 1077963)
C (0.123) DB6: CLP commands on Windows with V9.1 (note 1080149)
C (0.124) DB6: Set DB2CODEPAGE=819 for non-Unicode (note 1084400)
C (0.126) DB6: reuse optguidelines on FAE statements (note 1087375)
C (0.126) DB6: Enforce DB2CODEPAGE=819 for non-Unicode environments (note 1084400)
C (0.128) DB6: db6_free on invalid memory area (note 1092030)
C (0.133) DB6: statement cache enhancements (note 1101031)
C (0.136) DB6: change for enhancement pack installer (note 1111536)
C (0.138) DB6: improoved table size estimate for DB8 V8 (note 1119934)
C (0.144) I5/OS ldappasswd support for 5250 terminal. (note 1129573)
C (0.144) MSSQL: ODBC fastload on separate connection (note 1131805)
C
C Supported features:
C
C ..retrieving configuration parameters
C ..done
C Running with UTF-8 Unicode
C
C Tue Feb 02 10:23:04 2010
C Running with CLI driver
C DB2 client driver version '09.01.0007'
C Connected to DB2 server type 'DB2/NT64'
C Connected to DB2 version '09.01.0007'
C Connect to 'ENP' as 'SAPENP' schema 'SAPENP' o.k.; con_hdl=0
C Database code page is ok.
C Database collating sequence is ok.
C DB2_WORKLOAD=SAP is set in DB2 registry as required.
C CLI Insert Buffering is disabled on single partition databases.
C DbSl trace SM50: switch request to level 1
C DbSlControl: returning SAPDBHOST='ENP'
B Connection 0 opened (DBSL handle 0)
B Wp Hdl ConName ConId ConState TX PRM RCT TIM MAX OPT Date Time DBHost
B 000 000 R/3 000000000 ACTIVE NO YES NO 000 255 255 20100202 102303 ENP
C DbSlControl: returning SAPDBHOST='ENP'
M db_connect o.k.
M ICT: exclude compression: .zip,.cs,.rar,.arj,.z,.gz,.tar,.lzh,.cab,.hqx,.ace,.jar,.ear,.war,.css,.pdf,.js,.gzip,.uue,.bz2,.iso,.sda,.sar,.gif
I
I Tue Feb 02 10:23:05 2010
I MtxInit: 0 0 0
M SHM_PRES_BUF (addr: 0000000015400050, size: 4400000)
M SHM_ROLL_AREA (addr: 000007FFDDA80050, size: 268435456)
M SHM_PAGING_AREA (addr: 0000000015840050, size: 134217728)
M SHM_ROLL_ADM (addr: 000000001D850050, size: 2678942)
M SHM_PAGING_ADM (addr: 000000001DAE0050, size: 525344)
M ThCreateNoBuffer allocated 544152 bytes for 1000 entries at 000000001DB70050
M ThCreateNoBuffer index size: 3000 elems
M ThCreateVBAdm allocated 12176 bytes (50 server) at 000000000AE50050
X EmInit: MmSetImplementation( 2 ).
X MM global diagnostic options set: 0
X <ES> client 0 initializing ....
X Using implementation view
X ES initialized.
B db_con_shm_ini: WP_ID = 0, WP_CNT = 17, CON_ID = -1
B dbtbxbuf: Buffer TABL (addr: 0000000021540160, size: 30000000, end: 00000000231DC4E0)
B dbtbxbuf: Buffer TABLP (addr: 00000000231E0160, size: 10240000, end: 0000000023BA4160)
B dbexpbuf: Buffer EIBUF (addr: 0000000023BC0170, size: 4194304, end: 0000000023FC0170)
B dbexpbuf: Buffer ESM (addr: 0000000023FD0170, size: 4194304, end: 00000000243D0170)
B dbexpbuf: Buffer CUA (addr: 00000000243E0170, size: 3072000, end: 00000000246CE170)
B dbexpbuf: Buffer OTR (addr: 00000000246D0170, size: 4194304, end: 0000000024AD0170)
M CCMS: AlInitGlobals : alert/use_sema_lock = TRUE.
S *** init spool environment
S initialize debug system
T Stack direction is downwards.
T debug control: prepare exclude for printer trace
T new memory block 00000000128BEA10
S spool kernel/ddic check: Ok
S using table TSP02FX for frontend printing
S 1 spool work process(es) found
S frontend print via spool service enabled
S printer list size is 150
S printer type list size is 50
S queue size (profile) = 300
S hostspool list size = 3000
S option list size is 30
S found processing queue enabled
S found spool memory service RSPO-RCLOCKS at 000000002DDF00D0
S doing lock recovery
S setting server cache root
S found spool memory service RSPO-SERVERCACHE at 000000002DDF0610
S using messages for server info
S size of spec char cache entry: 297032 bytes (timeout 100 sec)
S size of open spool request entry: 2272 bytes
S immediate print option for implicitely closed spool requests is disabled
A
A -PXA--
A PXA INITIALIZATION
A PXA: Locked PXA-Semaphore.
A System page size: 4kb, total admin_size: 11460kb, dir_size: 11392kb.
A Attached to PXA (address 000007FFEDAB0050, size 300000K)
A abap/pxa = shared protect gen_remote
A PXA INITIALIZATION FINISHED
A -PXA--
A
A ABAP ShmAdm attached (addr=000007FF35ED5000 leng=20955136 end=000007FF372D1000)
A >> Shm MMADM area (addr=000007FF363AEF10 leng=244096 end=000007FF363EA890)
A >> Shm MMDAT area (addr=000007FF363EB000 leng=15622144 end=000007FF372D1000)
A RFC Destination> destination ENP_ENP_00 host ENP system ENP systnr 0 (ENP_ENP_00)
A RFC Options> H=ENP,S=00,d=2,
A RFC FRFC> fallback activ but this is not a central instance.
A
A RFC rfc/signon_error_log = -1
A RFC rfc/dump_connection_info = 0
A RFC rfc/dump_client_info = 0
A RFC rfc/cp_convert/ignore_error = 1
A RFC rfc/cp_convert/conversion_char = 23
A RFC rfc/wan_compress/threshold = 251
A RFC rfc/recorder_pcs not set, use defaule value: 2
A RFC rfc/delta_trc_level not set, use default value: 0
A RFC rfc/no_uuid_check not set, use default value: 0
A RFC rfc/bc_ignore_thcmaccp_retcode not set, use default value: 0
A RFC Method> initialize RemObjDriver for ABAP Objects
M ThrCreateShObjects allocated 35354 bytes at 000000002DF60050
N SsfSapSecin: putenv(SECUDIR=F:\usr\sap\ENP\DVEBMGS00\sec): ok
N
N =================================================
N === SSF INITIALIZATION:
N ===...SSF Security Toolkit name SAPSECULIB .
N ===...SSF trace level is 0 .
N ===...SSF library is F:\usr\sap\ENP\DVEBMGS00\exe\sapsecu.dll .
N ===...SSF hash algorithm is SHA1 .
N ===...SSF symmetric encryption algorithm is DES-CBC .
N ===...completed with return code 5.
N =================================================
N MskiInitLogonTicketCacheHandle: Logon Ticket cache pointer retrieved from shared memory.
N MskiInitLogonTicketCacheHandle: Workprocess runs with Logon Ticket cache.
M JrfcVmcRegisterNativesDriver o.k.
W =================================================
W === ipl_Init() called
B dbtran INFO (init_connection '<DEFAULT>' [DB6:700.08]):
B max_blocking_factor = 30, max_in_blocking_factor = 60,
B min_blocking_factor = 1, min_in_blocking_factor = 1,
B prefer_union_all = 1, prefer_join = 1,
B prefer_fix_blocking = 0, prefer_in_itab_opt = 0,
B convert AVG = 1, alias table FUPD = 0,
B escape_as_literal = 0, opt GE LE to BETWEEN = 0,
B select * =0x0f, character encoding = STD / <none>:-,
B use_hints = abap->1, dbif->0x3, upto->2147483647, rule_in->0,
B rule_fae->0, concat_fae->0, concat_fae_or->0
W ITS Plugin: Path dw_gui
W ITS Plugin: Description ITS Plugin - ITS rendering DLL
W ITS Plugin: sizeof(SAP_UC) 2
W ITS Plugin: Release: 700, [7000.0.144.20050900]
W ITS Plugin: Int.version, [33]
W ITS Plugin: Feature set: [16]
W ===... Calling itsp_Init in external dll ===>
W === ipl_Init() returns 0, ITSPE_OK: OK
W =================================================
N VSI: WP init in ABAP VM completed with rc=0
E Enqueue Info: rdisp/wp_no_enq=1, rdisp/enqname=<empty>, assume ENP_ENP_00
E Replication is disabled
E EnqCcInitialize: local lock table initialization o.k.
E EnqId_SuppressIpc: local EnqId initialization o.k.
E EnqCcInitialize: local enqueue client init o.k.
M
M Tue Feb 02 10:23:06 2010
M SecAudit(RsauShmInit): WP attached to existing shared memory.
M SecAudit(RsauShmInit): addr of SCSA........... = 000000000A960050
M SecAudit(RsauShmInit): addr of RSAUSHM........ = 000000000A9607C0
M SecAudit(RsauShmInit): addr of RSAUSLOTINFO... = 000000000A960800
M SecAudit(RsauShmInit): addr of RSAUSLOTS...... = 000000000A96080C
M
M Tue Feb 02 10:23:28 2010
M rdisp/rb_cleaned_rfc = 0
A
A Tue Feb 02 10:23:34 2010
A RFC FRFC> fallback on the central gateway ENP sapgw00 activ -
Call transaction error handling
how to maintain the log i.e sucess/failures like below.
Line No. Success/ Failure Document No Error Details
1 S Doc 740000001
2 S Doc 740000002
3 F Co- code does not exist
4 F GL Account does not exist
I'm getting only one last document no: but i need all the documents to be displayed i.e either success/failures.
below is my code.
TYPES: BEGIN OF ty_filedata,
bukrs TYPE bukrs, "Company code
blart TYPE blart, "Document type
bldat TYPE char10, "Document Date
budat TYPE char10, "Posting date
xblnr TYPE xblnr, "Reference
bktxt TYPE bktxt, "Document Header text
waers TYPE waers, "Currency
newbs TYPE bschl, "Posting Key for the next line item
wrbtr TYPE char10, "Amount
zuonr LIKE bsik-zuonr, "Assignment
sgtxt TYPE sgtxt, "Text
newko TYPE hkont, "Account for the next line item
END OF ty_filedata.
TYPES: BEGIN OF ty_detail_log,
item_no TYPE i, " Item line no.
status(1) TYPE c, " Status - success/failure
doc_no TYPE bkpf-belnr," Document No.
message TYPE string, " Message
END OF ty_detail_log.
*& DATA declaration of internal tables
Internal Table declaration for excel data
DATA: it_itab TYPE STANDARD TABLE OF alsmex_tabline INITIAL SIZE 0,
Internal Table declaration for upload data
it_upload TYPE STANDARD TABLE OF ty_filedata INITIAL SIZE 0,
Internal Table Declaration for BDCDATA
it_bdcdata TYPE STANDARD TABLE OF bdcdata,
Internal Table Declaration for BDCMSGCOLL
it_bdcmsgcoll TYPE STANDARD TABLE OF bdcmsgcoll,
Internal Table Declaration for FILENMAE
lf_fname TYPE rlgrap-filename.
t_err_log TYPE STANDARD TABLE OF ty_err
INITIAL SIZE 0, " table for validation error log
t_DETAIL_LOG TYPE STANDARD TABLE OF TY_DETAIL_LOG.
C_MSGNO TYPE BDC_MNR VALUE '312',
*& DATA declaration of work area
Work Area declaration for Excel Data
DATA: w_itab TYPE alsmex_tabline,
Work Area declaration for upload data
w_upload TYPE ty_filedata,
Work Area declaration for upload data
w_upload_n TYPE ty_filedata,
Work Area declaration for upload data
w_bdcdata TYPE bdcdata,
Work Area declaration for upload data
w_bdcmsgcoll TYPE bdcmsgcoll,
w_detail_log TYPE ty_detail_log.
*& SELECTION-SCREEN
SELECTION-SCREEN: BEGIN OF BLOCK bk1 WITH FRAME TITLE text-001.
PARAMETERS:p_file TYPE rlgrap-filename. " MODIF ID G1.
SELECTION-SCREEN: END OF BLOCK bk1.
*& AT SELECTION SCREEN
AT SELECTION-SCREEN ON VALUE-REQUEST FOR p_file.
CALL FUNCTION 'KD_GET_FILENAME_ON_F4'
EXPORTING
dynpro_number = syst-dynnr
CHANGING
file_name = p_file
EXCEPTIONS
mask_too_long = 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.
*& START-OF-SELECTION
START-OF-SELECTION.
DATA: lw_itab TYPE alsmex_tabline.
lf_fname = p_file.
CALL FUNCTION 'ALSM_EXCEL_TO_INTERNAL_TABLE'
EXPORTING
filename = lf_fname
i_begin_col = '1'
i_begin_row = '6'
i_end_col = '12'
i_end_row = '999'
TABLES
intern = it_itab[]
EXCEPTIONS
inconsistent_parameters = 1
upload_ole = 2
OTHERS = 3.
IF sy-subrc <> 0.
*MESSAGE S205(ZF_COMMON_MSGS_FIN1) DISPLAY LIKE C_E.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
ELSE.
IF it_itab IS NOT INITIAL.
SORT it_itab BY row col.
DELETE it_itab WHERE row LT 6.
LOOP AT it_itab INTO lw_itab.
w_itab = lw_itab.
AT NEW row.
CLEAR: w_upload.
ENDAT.
CASE w_itab-col.
WHEN '0001'.
w_upload-bukrs = w_itab-value.
WHEN '0002'.
w_upload-blart = w_itab-value.
WHEN '0003'.
w_upload-bldat = w_itab-value.
WHEN '0004'.
w_upload-budat = w_itab-value.
WHEN '0005'.
w_upload-xblnr = w_itab-value.
WHEN '0006'.
w_upload-bktxt = w_itab-value.
WHEN '0007'.
w_upload-waers = w_itab-value.
WHEN '0008'.
w_upload-newbs = w_itab-value.
WHEN '0009'.
w_upload-wrbtr = w_itab-value.
WHEN '0010'..
w_upload-zuonr = w_itab-value.
WHEN '0011'.
w_upload-sgtxt = w_itab-value.
WHEN '0012'.
w_upload-newko = w_itab-value.
ENDCASE.
AT END OF row.
APPEND w_upload TO it_upload.
CLEAR: w_upload.
ENDAT.
ENDLOOP.
*endif.
ENDIF.
DATA: lw_upload TYPE ty_filedata,
lv_lines TYPE sy-tabix,
lv_index TYPE sy-tabix.
DESCRIBE TABLE it_upload LINES lv_lines.
LOOP AT it_upload INTO lw_upload.
lv_index = sy-tabix.
w_upload = lw_upload.
IF NOT w_upload-bukrs IS INITIAL.
IF lv_index GT 1.
CALL TRANSACTION 'FB01' USING it_bdcdata
MODE 'N' UPDATE 'S' MESSAGES INTO it_bdcmsgcoll.
PERFORM fr_format_message_text.
REFRESH: it_bdcdata.
ENDIF.
PERFORM bdc_dynpro USING 'SAPMF05A' '0100'.
PERFORM bdc_field USING 'BDC_CURSOR'
'BKPF-XBLNR'.
PERFORM bdc_field USING 'BDC_OKCODE'
'/00'.
PERFORM bdc_field USING 'BKPF-BLDAT'
w_upload-bldat.
PERFORM bdc_field USING 'BKPF-BLART'
w_upload-blart.
PERFORM bdc_field USING 'BKPF-BUKRS'
w_upload-bukrs.
PERFORM bdc_field USING 'BKPF-BUDAT'
w_upload-budat.
PERFORM bdc_field USING 'BKPF-WAERS'
w_upload-waers.
PERFORM bdc_field USING 'BKPF-XBLNR'
w_upload-xblnr.
*perform bdc_field using 'FS006-DOCID'
PERFORM bdc_field USING 'RF05A-NEWBS'
w_upload-newbs.
PERFORM bdc_field USING 'RF05A-NEWKO'
w_upload-newko.
ENDIF.
IF lv_index NE lv_lines.
lv_index = lv_index + 1.
READ TABLE it_upload INTO w_upload_n INDEX lv_index.
PERFORM bdc_dynpro USING 'SAPMF05A' '0300'.
PERFORM bdc_field USING 'BDC_CURSOR'
'BSEG-WRBTR'.
PERFORM bdc_field USING 'BDC_OKCODE'
'/00'.
PERFORM bdc_field USING 'BSEG-WRBTR'
w_upload-wrbtr.
PERFORM bdc_field USING 'RF05A-NEWBS'
w_upload_n-newbs.
PERFORM bdc_field USING 'RF05A-NEWKO'
w_upload_n-newko.
ELSE.
PERFORM bdc_dynpro USING 'SAPMF05A' '0300'.
PERFORM bdc_field USING 'BDC_CURSOR'
'BSEG-WRBTR'.
PERFORM bdc_field USING 'BDC_OKCODE'
'=BU'.
PERFORM bdc_field USING 'BSEG-WRBTR'
w_upload-wrbtr.
ENDIF.
PERFORM bdc_dynpro USING 'SAPLKACB' '0002'.
PERFORM bdc_field USING 'BDC_CURSOR'
'COBL-ANLN1'.
PERFORM bdc_field USING 'BDC_OKCODE'
'=ENTE'.
ENDLOOP.
CALL TRANSACTION 'FB01' USING it_bdcdata
MODE 'N' UPDATE 'S' MESSAGES INTO it_bdcmsgcoll.
PERFORM fr_format_message_text .
REFRESH: it_bdcdata.
*& Form BDC_DYNPRO
FORM bdc_dynpro USING program dynpro.
CLEAR w_bdcdata.
w_bdcdata-program = program.
w_bdcdata-dynpro = dynpro.
w_bdcdata-dynbegin = 'X'.
APPEND w_bdcdata TO it_bdcdata.
ENDFORM. "BDC_DYNPRO
Insert field *
FORM bdc_field USING fnam fval.
IF fval <> space.
CLEAR w_bdcdata.
w_bdcdata-fnam = fnam.
w_bdcdata-fval = fval.
APPEND w_bdcdata TO it_bdcdata.
ENDIF.
ENDFORM. "BDC_FIELD
*& Form fr_format_message_text
FORM fr_format_message_text.
DATA: lf_msg TYPE string.
WRITE:/ sy-uline(125).
FORMAT COLOR 1 INTENSIFIED ON.
WRITE : /1 sy-vline,
2 text-041 , "'record Number',
16 sy-vline,
17 text-042 , " 'success/failure',
35 sy-vline,
36 text-043, " 'document no',
55 sy-vline,
56 text-044, "'Error details',
125 sy-vline.
WRITE:/ sy-uline(125).
LOOP AT it_bdcmsgcoll INTO w_bdcmsgcoll.
CALL FUNCTION 'FORMAT_MESSAGE'
EXPORTING
id = w_bdcmsgcoll-msgid
lang = sy-langu
no = w_bdcmsgcoll-msgnr
v1 = w_bdcmsgcoll-msgv1
v2 = w_bdcmsgcoll-msgv2
v3 = w_bdcmsgcoll-msgv3
v4 = w_bdcmsgcoll-msgv4
IMPORTING
msg = lf_msg
EXCEPTIONS
not_found = 1
OTHERS = 2.
IF sy-subrc EQ 0.
WRITE:/01 sy-vline,
02 sy-tabix,
16 sy-vline,
17 w_bdcmsgcoll-msgtyp,
35 sy-vline,
36 w_bdcmsgcoll-msgv1,
55 sy-vline,
56 lf_msg,
125 sy-vline.
WRITE:/ sy-uline(125).
ENDIF.
ENDLOOP.
ENDFORM. "fr_format_message_text
Thanks in advance.Hi Neelima,
Just put the following code within that LOOP...ENDLOOP statement.
LOOP AT it_upload INTO lw_upload.
CALL TRANSACTION 'FB01' USING it_bdcdata
MODE 'N' UPDATE 'S' MESSAGES INTO it_bdcmsgcoll.
PERFORM fr_format_message_text .
REFRESH: it_bdcdata.
ENDLOOP.
Regards,
R.Nagarajan.
We can - -
System Update 5.02.0007 and RDP
TVSU 5.02.0007 show only splash screen and then closes when run on Windows 7 Enterprise 64 bit via Remote Desktop
In previous version you could set compatibility mode to XP SP3 for the TVSU.EXE and it would work, but if you do that on the current version, you'll get the error messages saying that you need Windows 7 to run the program.
Any workarounds for this problem?? It is VERY annoying
Best regards
HDMHi Customer,
This is a known limitation and we have below workaround:
under the TVSU installation directory, usually is =>C:\Program Files\Lenovo\System Update, here you can find a file named "tvsukernel.exe", under the remote control scenario , you can launch TVSU by double click of "tvsukernel.exe" instead of double click "tvsu.exe", so you can create a shortcut for "tvsukernel.exe" on the desktop, then use it to launch tvsu.Please test and feedback your result. Sorry for the inconvinient. -
Error in Proportional Factor Calculation Program
Hi ,
I have developed an ABAP Program to calculate Proportional Factor(PF) as below.
Generally,to calculate the PF for a period , we need to use transaction /sapapo/sdp94 to create a profile .After doing that , to calculate PF we need to go transaction /sapapo/mv8v .
Now,the given program has three options :-
1)Create : To create the selection-ID by taking areabasepackRS as name of the selection-ID . Here we need to give the excel sheet that is used to load data into /sapapo/mc8v to calculate PF.
2)Calculate PF : This option is used to calculate proportional factor.
Now if we try to calculate PF ,I get an error message saying there are no
plannable characteristic combinations .
3) Delete : This option is used to delete the selection profile.
I am getting an error in this program which I have explained with the document attached in this mail .
Please could anyone help me out with this .
The program is as below:-
<b>report ZRSNORMS_PPF
no standard page heading line-size 255.</b>
*include bdcrecx1.
INCLUDE ZAPO_DATA_DECLARATION_PPF.
INCLUDE Z_APO_FORMS_PPF.
AT SELECTION-SCREEN ON VALUE-REQUEST FOR p_file1.
CALL FUNCTION 'KD_GET_FILENAME_ON_F4'
EXPORTING
program_name = syst-repid
DYNPRO_NUMBER = SYST-DYNNR
field_name = p_file1
STATIC = ' '
MASK = ' '
CHANGING
file_name = p_file1
EXCEPTIONS
MASK_TOO_LONG = 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.
start-of-selection.
PERFORM READ_DATA TABLES I_PROFILE
I_EXEL
IT_PROFILE_NAME
USING P_FILE1
CHANGING W_SUBRC.
PERFORM SAVE_SELECTION TABLES I_EXEL
IT_SAVE_SEL
IT_PROFILE_NAME.
IT_GRP-OBJNAM = 'ZRSBASPCK'.
APPEND IT_GRP.
LOOP AT IT_GRP INTO W_GROUP.
APPEND W_GROUP TO IT_GROUP.
ENDLOOP.
G_PAREAID = 'ZRSPAHPC'.
G_MVIEW = 'ZRSPAHPC'.
G_COUNT = 0.
IF CREATE = 'X'.
LOOP AT IT_SAVE_SEL INTO W_SEL_SAVE.
IF W_SEL_SAVE-IOBJNM = '9AVERSION' AND SY-TABIX > 1.
G_COUNT = G_COUNT + 1.
READ TABLE IT_PROFILE_NAME INDEX G_COUNT.
G_NAME = IT_PROFILE_NAME-F_NAME.
CALL FUNCTION '/SAPAPO/MCPSH_SELECTION_SAVE'
EXPORTING
IV_SELID =
IV_FLG_USED_FOR =
IV_PAREAID = G_PAREAID
IV_MVIEW = G_MVIEW
IV_SEL_DESCRIPTION = G_NAME
IT_SELECTION = IT_SEL_SAVE
IT_OBJECTS =
IT_SEL_GROUP = IT_GROUP
IV_POPUP_SEL_DESCRIPTION =
IMPORTING
EV_SELID =
EV_SEL_DESCRIPTION =
EXCEPTIONS
DUPLICATE_SELECTION = 1
MULTIPLE_SELECTION = 2
INCONSISTENT_DATABASE = 3
DUPLICATE_DESCRIPTION = 4
INVALID_DESCRIPTION = 5
NO_PERMISSION = 6
SELID_INVALID = 7
OTHERS = 8
IF SY-SUBRC <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
CLEAR IT_SEL_SAVE[].
APPEND W_SEL_SAVE TO IT_SEL_SAVE.
ELSEIF W_SEL_SAVE-IOBJNM = '9AVERSION' AND SY-TABIX = 1.
APPEND W_SEL_SAVE TO IT_SEL_SAVE.
ELSE.
APPEND W_SEL_SAVE TO IT_SEL_SAVE.
ENDIF.
ENDLOOP.
G_COUNT = G_COUNT + 1.
READ TABLE IT_PROFILE_NAME INDEX G_COUNT.
G_NAME = IT_PROFILE_NAME-F_NAME.
CALL FUNCTION '/SAPAPO/MCPSH_SELECTION_SAVE'
EXPORTING
IV_SELID =
IV_FLG_USED_FOR =
IV_PAREAID = G_PAREAID
IV_MVIEW = G_MVIEW
IV_SEL_DESCRIPTION = G_NAME
IT_SELECTION = IT_SEL_SAVE
IT_OBJECTS =
IT_SEL_GROUP = IT_GROUP
IV_POPUP_SEL_DESCRIPTION =
IMPORTING
EV_SELID =
EV_SEL_DESCRIPTION =
EXCEPTIONS
DUPLICATE_SELECTION = 1
MULTIPLE_SELECTION = 2
INCONSISTENT_DATABASE = 3
DUPLICATE_DESCRIPTION = 4
INVALID_DESCRIPTION = 5
NO_PERMISSION = 6
SELID_INVALID = 7
OTHERS = 8
IF SY-SUBRC <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
IV_GROUP = 'ZRSBASPCK'.
LOOP AT IT_SEL_SAVE INTO w_confirm_sel.
APPEND w_confirm_sel TO it_confirm_sel.
ENDLOOP.
CALL FUNCTION '/SAPAPO/MSDP_SH_OBJ_LIST_BUILD'
EXPORTING
IV_PAREAID = G_PAREAID
IV_MVIEW = G_MVIEW
IV_DVIEW =
IV_FROMDATE =
IV_ENDDATE =
IV_NO_POPUPS =
IMPORTING
ET_SH_OBJECTS =
EXCEPTIONS
INVALID_INPUT = 1
INTERNAL_ERROR = 2
OTHERS = 3
IF SY-SUBRC <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
CLEAR IT_SEL_SAVE[].
ENDIF.
if calc_ppf = 'X'.
PERFORM CALC_PPF TABLES I_EXEL
BDCTAB
IT_PROFILE_NAME.
ENDIF.
if del_prof = 'X'.
LOOP AT I_EXEL.
concatenate i_exel-area I_EXEL-BASE INTO DEL_NAME.
SELECT SINGLE * FROM /SAPAPO/TS_SELKO INTO IT_TS_SELKO
WHERE SEL_DESRCIPTION = DEL_NAME.
DEL_PROFILE = IT_TS_SELKO-SELECTIONID.
CALL FUNCTION '/SAPAPO/MCPSH_SELECTION_DELETE'
EXPORTING
IV_SELID = DEL_PROFILE
IV_FLG_CONFIRM_TRANS = 'X'
EXCEPTIONS
NO_ENTRY = 1
NO_AUTHORITY = 2
DELETION_NOT_POSSIBLE = 3
OTHERS = 4
IF SY-SUBRC <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
ENDLOOP.
ENDIF.
<b>INCLUDE ZAPO_DATA_DECLARATION_PPF .</b>
types: t_ts_selpo type /sapapo/ts_selpo.
TYPES: BEGIN OF T_EXEL,
PROF_DATFRM TYPE DATS,
PROF_DATTO TYPE DATS,
FORCAST_FROM TYPE DATS,
FORCAST_TO TYPE DATS,
AREA(60),
BASE(60),
POPID(60),
RATING(60),
RS(60),
END OF T_EXEL.
types: begin of t_profile,
obj(30),
val(60),
end of t_profile.
TYPES: begin of t_profile_name,
f_name(60),
end of t_profile_name.
DATA: G_COUNT TYPE I VALUE 0.
*TYPES: T_SAVE_SEL LIKE IT_SELECTION.
data: w_subrc TYPE sy-subrc,
I_TS_SELPO TYPE Table of t_ts_selpo with header line,
I_EXEL TYPE Table of t_EXEL with header line.
DATA: IV_GROUP TYPE /SAPAPO/IOBJNM.
DATA: IT_PROFILE_NAME TYPE TABLE OF T_PROFILE_NAME WITH HEADER LINE.
data: i_profile type table of t_profile with header line.
*/sapapo/ts_iobj_selection_tab.
data: IT_SEL_SAVE TYPE /sapapo/ts_iobj_selection_tab,
w_SEL_SAVE type /SAPAPO/TS_IOBJ_SELECTION.
DATA: IT_CONFIRM_SEL TYPE /SAPAPO/SH_SEL_RANGE_TAB,
W_CONFIRM_SEL TYPE /SAPAPO/SH_SEL_RANGE_STR.
TYPES: BEGIN OF T_SAVE_SEL,
IOBJNM(30),
SIGN,
OPTION(2),
LOW(60),
HIGH(60),
END OF T_SAVE_SEL.
DATA: IT_SAVE_SEL TYPE TABLE OF T_SAVE_SEL WITH HEADER LINE.
TYPES: BEGIN OF T_GRP,
OBJNAM(30),
END OF T_GRP.
DATA: IT_GRP TYPE TABLE OF T_GRP WITH HEADER LINE.
DATA DECLARATION FOR FUNC MODULE **************
DATA: IT_GROUP TYPE /SAPAPO/TS_GROUP_BY_TAB,
W_GROUP TYPE /SAPAPO/TS_GROUP_BY_STR.
DATA: G_PAREAID TYPE /SAPAPO/TS_PAREAID,
G_MVIEW TYPE /SAPAPO/PB_MVIEW,
G_NAME TYPE /SAPAPO/TS_SEL_DESCR.
BDC TABLES ***************************
DATA: bdcdata LIKE bdcdata OCCURS 0 WITH HEADER LINE.
DATA: it_messtab LIKE bdcmsgcoll OCCURS 0 WITH HEADER LINE.
DATA : BDCTAB like BDCDATA occurs 0 with header line.
DATA : w_file type string.
****************BDC ERROR TAB ***************************
DATA : xcount1 TYPE i,
xstat TYPE i,
xmsgv1 LIKE balm-msgv1,
xmsgv2 LIKE balm-msgv2,
xmsgv3 LIKE balm-msgv3,
xmsgv4 LIKE balm-msgv4,
xmessage(80) TYPE c.
DATA : BEGIN OF t_errlog OCCURS 0,
sno TYPE i,
message(80) TYPE c,
END OF t_errlog.
DATA: DEL_PROFILE TYPE /SAPAPO/SELECTIONID2,
DEL_NAME(60).
************DUPLICATE NAME TAB **************************
DATA: IT_NOT_PROCESSED TYPE TABLE OF /SAPAPO/TS_SELPO WITH HEADER LINE.
DELETE TAB *****************************
DATA: IT_TS_SELKO TYPE TABLE OF /SAPAPO/TS_SELKO WITH HEADER LINE.
SELECTION-SCREEN : BEGIN OF BLOCK b1.
parameters: p_file1 TYPE rlgrap-filename.
parameters: create type c radiobutton group g1,
calc_ppf type c radiobutton group g1,
del_prof type c radiobutton group g1.
SELECTION-SCREEN END OF BLOCK b1.
Include Z_APO_FORMS_PPF
*& Include Z_APO_FORMS_PPF
*& Form READ_DATA
text
-->P_I_PROFILE text
-->P_I_EXEL text
-->P_IT_PROFILE_NAME text
-->P_P_FILE1 text
<--P_W_SUBRC text
FORM READ_DATA TABLES P_I_PROFILE STRUCTURE I_PROFILE
P_I_EXEL STRUCTURE I_EXEL
P_IT_PROFILE_NAME STRUCTURE IT_PROFILE_NAME
USING P_P_FILE1
CHANGING P_W_SUBRC.
DATA : iexcel LIKE zexcel_read OCCURS 0 WITH HEADER LINE,
G_DATE TYPE DATS.
data: l_name(60).
CLEAR p_w_subrc.
CALL FUNCTION 'ZALSM_EXCEL_TO_INTERNAL_TABLE'
EXPORTING
filename = p_p_file1
i_begin_col = 1
i_begin_row = 1
i_end_col = 62
i_end_row = 50000
TABLES
intern = iexcel.
EXCEPTIONS
inconsistent_parameters = 1
upload_ole = 2
OTHERS = 3.
IF sy-subrc <> 0.
p_w_subrc = 0 .
endif.
MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
ENDIF.
LOOP AT iexcel WHERE row > 1.
IF iexcel-col = '0001'.
PERFORM CONVERT_DATE CHANGING G_DATE iexcel-value.
p_i_EXEL-PROF_DATFRM = G_DATE.
ENDIF.
IF iexcel-col = '0002'.
PERFORM CONVERT_DATE CHANGING G_DATE iexcel-value.
p_i_EXEL-PROF_DATTO = G_DATE.
ENDIF.
IF iexcel-col = '0003'.
PERFORM CONVERT_DATE CHANGING G_DATE iexcel-value.
p_i_EXEL-FORCAST_FROM = G_DATE.
ENDIF.
IF iexcel-col = '0004'.
PERFORM CONVERT_DATE CHANGING G_DATE iexcel-value.
p_i_EXEL-FORCAST_TO = G_DATE.
ENDIF.
IF iexcel-col = '0005'.
p_i_EXEL-AREA = iexcel-value.
p_i_profile-obj = 'ZRSAREA'.
p_i_profile-VAL = iexcel-value.
append p_i_PROFILE.
clear p_i_PROFILE.
ENDIF.
IF iexcel-col = '0006'.
p_i_EXEL-BASE = iexcel-value.
p_i_profile-obj = 'ZRSBASPCK'.
p_i_profile-VAL = iexcel-value.
append p_i_PROFILE.
clear p_i_PROFILE.
ENDIF.
IF iexcel-col = '0007'.
p_i_EXEL-POPID = iexcel-value.
p_i_profile-obj = 'ZRSPOPULN'.
p_i_profile-VAL = iexcel-value.
append p_i_PROFILE.
clear p_i_PROFILE.
ENDIF.
IF iexcel-col = '0008'.
p_i_EXEL-RATING = iexcel-value.
ENDIF.
IF iexcel-col = '0009'.
p_i_EXEL-RS = iexcel-value.
p_i_profile-obj = 'ZRSCUSTMR'.
p_i_profile-VAL = iexcel-value.
append p_i_PROFILE.
clear p_i_PROFILE.
ENDIF.
at end of row.
append p_i_EXEL.
clear p_i_EXEL.
endat.
endloop.
loop at P_I_EXEL.
concatenate P_I_EXEL-AREA P_I_EXEL-BASE INTO L_NAME.
P_it_profile_name-f_name = l_name.
append P_it_profile_name.
ENDLOOP.
ENDFORM. " READ_DATA
*& Form CONVERT_DATE
text
<--P_G_DATE text
<--P_IEXCEL_VALUE text
FORM CONVERT_DATE CHANGING P_G_DATE
P_IEXCEL_VALUE.
CALL FUNCTION 'CONVERT_DATE_TO_INTERNAL'
EXPORTING
DATE_EXTERNAL = p_iexcel_value
ACCEPT_INITIAL_DATE =
IMPORTING
DATE_INTERNAL = p_g_date
EXCEPTIONS
DATE_EXTERNAL_IS_INVALID = 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. " CONVERT_DATE
*& Form SAVE_SELECTION
text
-->P_I_EXEL text
-->P_IT_SAVE_SEL text
-->P_IT_PROFILE_NAME text
FORM SAVE_SELECTION TABLES P_I_EXEL STRUCTURE I_EXEL
P_IT_SAVE_SEL STRUCTURE IT_SAVE_SEL
P_IT_PROFILE_NAME STRUCTURE IT_PROFILE_NAME.
DATA: L_PAREAID(40).
loop at p_i_exel.
p_it_save_sel-iobjnm = '9AVERSION'.
p_it_save_sel-SIGN = 'I'.
p_it_save_sel-OPTION = 'EQ'.
p_it_save_sel-LOW = '000'.
APPEND P_IT_SAVE_SEL.
CLEAR P_IT_SAVE_SEL.
p_it_save_sel-iobjnm = 'ZRSAREA'.
p_it_save_sel-SIGN = 'I'.
p_it_save_sel-OPTION = 'EQ'.
p_it_save_sel-LOW = P_I_EXEL-AREA.
APPEND P_IT_SAVE_SEL.
CLEAR P_IT_SAVE_SEL.
IF NOT P_I_EXEL-BASE IS INITIAL.
p_it_save_sel-iobjnm = 'ZRSBASPCK'.
p_it_save_sel-SIGN = 'I'.
p_it_save_sel-OPTION = 'EQ'.
p_it_save_sel-LOW = P_I_EXEL-BASE.
ENDIF.
APPEND P_IT_SAVE_SEL.
CLEAR P_IT_SAVE_SEL.
IF NOT P_I_EXEL-POPID IS INITIAL.
p_it_save_sel-iobjnm = 'ZRSPOPULN'.
p_it_save_sel-SIGN = 'I'.
p_it_save_sel-OPTION = 'EQ'.
p_it_save_sel-LOW = P_I_EXEL-POPID.
APPEND P_IT_SAVE_SEL.
CLEAR P_IT_SAVE_SEL.
ENDIF.
IF NOT P_I_EXEL-RS IS INITIAL.
p_it_save_sel-iobjnm = 'ZRSCUSTMR'.
p_it_save_sel-SIGN = 'I'.
p_it_save_sel-OPTION = 'EQ'.
p_it_save_sel-LOW = P_I_EXEL-RS.
APPEND P_IT_SAVE_SEL.
CLEAR P_IT_SAVE_SEL.
ENDIF.
write 'hi'.
*CLEAR P_IT_SAVE_SEL[].
ENDLOOP.
*submit
ENDFORM. " SAVE_SELECTION
*& Form CALC_PPF
text
-->P_I_EXEL text
-->P_BDCTAB text
-->P_IT_PROFILE_NAME text
FORM CALC_PPF TABLES P_I_EXEL STRUCTURE I_EXEL
P_BDCTAB STRUCTURE BDCTAB
P_IT_PROFILE_NAME STRUCTURE IT_PROFILE_NAME.
DATA: PERIOD_FROM TYPE /SAPAPO/BASIS_VON_BIS,
PERIOD_TO TYPE /SAPAPO/BASIS_VON_BIS,
TRANSFER_FORM TYPE /SAPAPO/TARGET_VON_BIS,
TRANSFER_TO TYPE /SAPAPO/TARGET_VON_BIS,
SEL_PROFILE TYPE /SAPAPO/SEL_TXT.
DATA: SEL_NAME(60).
DATA : L_TEMP TYPE SY-DATUM,
L_TEMP1 TYPE SY-DATUM,
L_TEMP2 TYPE SY-DATUM,
L_TEMP3 TYPE SY-DATUM.
LOOP AT P_I_EXEL.
L_TEMP0(2) = P_I_EXEL-FORCAST_FROM6(2). "passed date
L_TEMP2(2) = P_I_EXEL-FORCAST_FROM4(2). "passed Month
L_TEMP4(4) = P_I_EXEL-FORCAST_FROM0(4). "passed year
L_TEMP10(2) = P_I_EXEL-FORCAST_TO6(2). "passed date
L_TEMP12(2) = P_I_EXEL-FORCAST_TO4(2). "passed Month
L_TEMP14(4) = P_I_EXEL-FORCAST_TO0(4). "passed year
L_TEMP20(2) = P_I_EXEL-PROF_DATFRM6(2). "passed date
L_TEMP22(2) = P_I_EXEL-PROF_DATFRM4(2). "passed Month
L_TEMP24(4) = P_I_EXEL-PROF_DATFRM0(4). "passed year
L_TEMP30(2) = P_I_EXEL-PROF_DATTO6(2). "passed date
L_TEMP32(2) = P_I_EXEL-PROF_DATTO4(2). "passed Month
L_TEMP34(4) = P_I_EXEL-PROF_DATTO0(4). "passed year
PERIOD_FROM = L_TEMP2.
PERIOD_TO = L_TEMP3.
transfer_form = L_TEMP.
TRANSFER_TO = L_TEMP1.
concatenate P_I_EXEL-AREA P_I_EXEL-BASE INTO SEL_NAME.
SEL_PROFILE = SEL_NAME.
perform bdc_dynpro using '/SAPAPO/RMDP_SHARE_VERSION_M' '1000'.
perform bdc_field using 'BDC_CURSOR'
'BPAREAID'.
perform bdc_field using 'BDC_OKCODE'
'=ONLI'.
perform bdc_field using 'PAREAID'
'ZRSPAHPC'.
perform bdc_field using 'FLG_AREA'
'X'.
perform bdc_field using 'BPAREAID'
'ZRSPAHPC'.
perform bdc_dynpro using '/SAPAPO/RMDP_SHARE_MANAGER' '1000'.
perform bdc_field using 'BDC_OKCODE'
'=UCOMM1'.
perform bdc_field using 'BDC_CURSOR'
'Z_DATE-HIGH'.
perform bdc_field using 'B_VER'
'000'.
perform bdc_field using 'B_KENN'
'9AVCORHIST'.
perform bdc_field using 'B_DATE-LOW'
PERIOD_FROM.
perform bdc_field using 'B_DATE-HIGH'
PERIOD_TO.
perform bdc_field using 'VERSION'
'000'.
perform bdc_field using 'Z_DATE-LOW'
transfer_form.
perform bdc_field using 'Z_DATE-HIGH'
TRANSFER_TO.
perform bdc_field using 'FLG_ONE'
'X'.
perform bdc_dynpro using '/SAPAPO/RMDP_SHARE_MANAGER' '1000'.
perform bdc_field using 'BDC_OKCODE'
'=ONLI'.
perform bdc_field using 'BDC_CURSOR'
'SEL_TXT'.
perform bdc_field using 'SEL_TXT'
SEL_PROFILE.
perform bdc_dynpro using '/SAPAPO/RMDP_SHARE_MANAGER' '1000'.
perform bdc_field using 'BDC_OKCODE'
'/EE'.
perform bdc_dynpro using '/SAPAPO/RMDP_SHARE_VERSION_M' '1000'.
perform bdc_field using 'BDC_OKCODE'
'=ONLI'.
perform bdc_field using 'BDC_OKCODE'
'/EE'.
perform bdc_field using 'BDC_CURSOR'
'PAREAID'.
*perform bdc_transaction using '/SAPAPO/MC8V'.
SELECT SINGLE * FROM /SAPAPO/TS_SELKO INTO IT_TS_SELKO
WHERE SEL_DESRCIPTION = sel_NAME.
if sy-subrc = 0.
call transaction '/SAPAPO/MC8V'
using bdctab
mode 'A'
update 'L'
messages into it_messtab.
describe table it_messtab lines xcount1.
read table it_messtab index xcount1.
LOOP AT it_messtab WHERE msgtyp = 'E'
OR msgtyp = 'A'.
MOVE It_messtab-msgv1 TO xmsgv1.
MOVE It_messtab-msgv2 TO xmsgv2.
MOVE It_messtab-msgv3 TO xmsgv3.
MOVE It_messtab-msgv4 TO xmsgv4.
CALL FUNCTION 'MESSAGE_PREPARE'
EXPORTING
LANGUAGE = sy-langu
msg_id = It_messtab-msgid
msg_no = It_messtab-msgnr
MSG_VAR1 = xmsgv1
MSG_VAR2 = xmsgv2
MSG_VAR3 = xmsgv3
MSG_VAR4 = xmsgv4
IMPORTING
MSG_TEXT = xmessage
EXCEPTIONS
FUNCTION_NOT_COMPLETED = 1
MESSAGE_NOT_FOUND = 2
OTHERS = 3
IF sy-subrc <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
MOVE sy-tabix TO t_errlog-sno.
MOVE xmessage TO t_errlog-message.
APPEND t_errlog.
CLEAR t_errlog..
ENDLOOP.
CLEAR BDCTAB[].
CLEAR SEL_NAME.
CLEAR P_I_EXEL.
endif.
ENDLOOP.
ENDFORM. " CALC_PPF
*& Form bdc_dynpro
text
-->P_0424 text
-->P_0425 text
FORM bdc_dynpro USING PROGRAM DYNPRO.
CLEAR bdcTAB.
bdcTAB-program = program.
bdcTAB-dynpro = dynpro.
bdcTAB-dynbegin = 'X'.
APPEND bdcTAB.
ENDFORM. " bdc_dynpro
*& Form bdc_field
text
-->P_0494 text
-->P_TRANSFER_FROM text
FORM bdc_field USING FNAM FVAL.
CLEAR bdcTAB.
bdcTAB-fnam = fnam.
bdcTAB-fval = fval.
APPEND bdcTAB.
ENDFORM. " bdc_fieldHi,
As I have not been able to attach the document, I will explain the problem in full as below:-
Business scenario - Consider a factory having 5 different customers (which is known as Customer_rs). We need to supply stock to each of them based on their past consumption. So to forecast this, we calculate a factor known as proportional factor based on the data we have for previous months.
So to calculate the PF for a period, we need to create a profile in /sapapo/sdp94 .
After creating the profile, the profile can be seen by clicking on SPD94 and going to selection-screen button .
Then to calculate PF , we need to go to transaction /sapapo/mv8v .
Here we will have to give the selection id that was saved in SDP94.
All this process has to be automated and a program has been created to do this.
A description of how the program works is as given below.
When we try to calculate the proportional factor with this program , the following error is obtained :-
There are no plannable characteristic combinations.
We are passing the same parameters that were passed by the SDP94 transaction to the standard function module for saving the selection ids. This is shown in the below screenshots.
In spite of this we are getting the error.
Now to delete the selection ids,click on delete option in the program .
But the problem is even if we click on delete , the PPF data will be stored in the database inspite of deleting the selection profiles .
Please can anyone help me out with this .
Regards,
Sushanth H.S.
Now we will have to give the selection description
Now the profile can be seen by going to SDP94 and clicking on selection profile button.
Now to calculate PF, go to transaction /sapapo/mv8v
Click on execute and give following inputs
This will forecast the PF for the period 01.09.2007 to 21.02.2007 based on data from 21.04.2007 to 20.05.2007
Click on other settings
Here we will have to give the selection id that was saved in SDP94.
Click on execute.
All this process has to be automated and a program was created to do this.
A description of how the program is given below.
Program zrsnorms_ppf
Execute.
Give file path of excel sheet.
Execute.
This will create the selection id by taking areabasepackRS as name of id.
This is the excel sheet that is used to load data into /sapapo/mc8v to calculate the PF.
Upon executing, the ids have been created
The new selection ids can be seen by going to /sapapo/sdp94
And clicking on selection profile.
Parameters passed to standard function module in order to save the selection id.
Now if we try to calculate PF using the program, the following happens
When executed,
BDC is called to input data to transaction /sapapo/mc8v to calculate ppf.
An error screen is generated with the message There are no plannable characteristic combinations.
We are passing the same parameters that were passed by the SDP94 transaction to the standard function module for saving the selection ids. This is shown in the below screenshots.
In spite of this we are getting the error.
When IV_POPUP_SEL_DESCRIPTION is passed, a popup will be displayed where the selection description will have to be entered. I am passing the same selection description here as is picked by the program.( H3HPCDEL00110096, H3HPCDEL00110063)
To avoid this, we need to go to SDP94 and after going to selection window, we need to save the selections as shown in the following screenshots.
Select the selection id one by one.
Click on save selection
Click on save.
Do the same for all ids created by the program.
Now if we try to calculate the PF using the program, it is seen to work
So what needs to be done is that we need to avoid going to SDP94 in order to save the selections after the ids are created by the program.
How the Program works
Se38
Program zrsnorms_ppf
Execute.
Give file path of excel sheet.
Execute.
This will create the selection id by taking areabasepackRS as name of id.
The new selection ids can be seen by going to /sapapo/sdp94
And clicking on selection profile.
Now the selection has to be saved. For that, follow the following procedure.
Click on selection window.
Click on load selection.
Select the ids.
Select and then press save.
Do the same for every id.
Only then can proportional factor be calculated.
Now go to program and select Calc_ppf, with filepath to excel sheet as the sel_ids will be pulled from the excel.
When executed,
BDC is called to input data to transaction /sapapo/mc8v to calculate ppf.
Now go to sdp94 and load the selection
Click on load data.
And make sure, data view is TDP_VIEW_PROP as shown
PPF will be shown for the period chosen in the excel sheet.
Now to delete the selection ids.
Go to the program and give file path of the excel sheet and execute.
The selection profiles will be deleted as shown.
But PPF data will be stored in the database inspite of deleting the selection profiles. And ppf can be shown by selecting the basepack and the sales area.
Click load data.
Business scenario - Consider a factory having 5 different customers (which is known as Customer_rs). We need to supply stock to each of them based on their past consumption. So to forecast this, we calculate a factor known as proportional factor based on the data we have for previous months.
So to calculate the PF for a period, we need to create a profile in /sapapo/sdp94
How it is done in standard transaction /SAPAPO/SDP94
Important pushbuttons and their functions
Click on selection window.
Give the selections
Click on save selection
A break-point has been set in the standard program to show what all parameters are being passed to the standard function module /SAPAPO/MCPSH_SELECTION_SAVE used to save the selection
Now we will have to give the selection description
Now the profile can be seen by going to SDP94 and clicking on selection profile button.
Now to calculate PF, go to transaction /sapapo/mv8v
Click on execute and give following inputs
This will forecast the PF for the period 01.09.2007 to 21.02.2007 based on data from 21.04.2007 to 20.05.2007
Click on other settings
Here we will have to give the selection id that was saved in SDP94.
Click on execute.
All this process has to be automated and a program was created to do this.
A description of how the program is given below.
Program zrsnorms_ppf
Execute.
Give file path of excel sheet.
Execute.
This will create the selection id by taking areabasepackRS as name of id.
This is the excel sheet that is used to load data into /sapapo/mc8v to calculate the PF.
Upon executing, the ids have been created
The new selection ids can be seen by going to /sapapo/sdp94
And clicking on selection profile.
Parameters passed to standard function module in order to save the selection id.
Now if we try to calculate PF using the program, the following happens
When executed,
BDC is called to input data to transaction /sapapo/mc8v to calculate ppf.
An error screen is generated with the message There are no plannable characteristic combinations.
We are passing the same parameters that were passed by the SDP94 transaction to the standard function module for saving the selection ids. This is shown in the below screenshots.
In spite of this we are getting the error.
When IV_POPUP_SEL_DESCRIPTION is passed, a popup will be displayed where the selection description will have to be entered. I am passing the same selection description here as is picked by the program.( H3HPCDEL00110096, H3HPCDEL00110063)
To avoid this, we need to go to SDP94 and after going to selection window, we need to save the selections as shown in the following screenshots.
Select the selection id one by one.
Click on save selection
Click on save.
Do the same for all ids created by the program.
Now if we try to calculate the PF using the program, it is seen to work
So what needs to be done is that we need to avoid going to SDP94 in order to save the selections after the ids are created by the program.
How the Program works
Se38
Program zrsnorms_ppf
Execute.
Give file path of excel sheet.
Execute.
This will create the selection id by taking areabasepackRS as name of id.
The new selection ids can be seen by going to /sapapo/sdp94
And clicking on selection profile.
Now the selection has to be saved. For that, follow the following procedure.
Click on selection window.
Click on load selection.
Select the ids.
Select and then press save.
Do the same for every id.
Only then can proportional factor be calculated.
Now go to program and select Calc_ppf, with filepath to excel sheet as the sel_ids will be pulled from the excel.
When executed,
BDC is called to input data to transaction /sapapo/mc8v to calculate ppf.
Now go to sdp94 and load the selection
Click on load data.
And make sure, data view is TDP_VIEW_PROP as shown
PPF will be shown for the period chosen in the excel sheet.
Now to delete the selection ids.
Go to the program and give file path of the excel sheet and execute.
The selection profiles will be deleted as shown.
But PPF data will be stored in the database inspite of deleting the selection profiles. And ppf can be shown by selecting the basepack and the sales area.
Click load data. -
Error on bapi_acc_document_post
Hi experts,
when i executing this bapi_acc_document_post, am getting error " FI/CO interface: Line item entered several times" i mention code below so please give me suggestion.
*& Report ZSAMPLE
REPORT ZSAMPLE.
data: BEGIN OF WA_HEADER,
ID TYPE I,
KUNNR TYPE n LENGTH 10,
INV_DATE TYPE c LENGTH 10,
PST_DATE TYPE c LENGTH 10,
REF TYPE invfo-xblnr,
AMT_DOCCUR TYPE PA2010-BETRG,
TXT(40),
END OF WA_HEADER.
DATA : IT_HEADER like WA_HEADER OCCURS 0 WITH HEADER LINE.
data: BEGIN OF WA_ITEM,
ID TYPE I,
GL_ACCOUNT TYPE n LENGTH 10,
ITEM_TEXT TYPE BAPIACGL09-ITEM_TEXT,
BUS_AREA TYPE BAPIACGL09-BUS_AREA,
AMT_DOCCUR TYPE BAPIACCR09-AMT_DOCCUR,
KOSTL TYPE CSKT-KOSTL,
* VAT(2),
END OF WA_ITEM.
DATA : IT_ITEM like WA_ITEM OCCURS 0 WITH HEADER LINE.
* value of excel-cell
TYPES: ty_d_itabvalue TYPE alsmex_tabline-value,
* internal table containing the excel data
ty_t_itab TYPE alsmex_tabline OCCURS 0,
* line type of sender table
BEGIN OF ty_s_senderline,
line(4096) TYPE c,
END OF ty_s_senderline,
* sender table
ty_t_sender TYPE ty_s_senderline OCCURS 0.
CONSTANTS: gc_esc VALUE '"'.
DATA temp_row TYPE I.
DATA TEMP(4).
INCLUDE lalsmexf01.
DATA: it_data1 TYPE ty_t_itab.
DATA: it_data2 TYPE ty_t_itab.
DATA: it_data_wa LIKE LINE OF it_data1.
DATA: it_data_wa2 LIKE LINE OF it_data1.
* DATA DECLARATION
data: st_rw_s1 TYPE i VALUE '2'.
data: st_cl_s1 TYPE i VALUE '1'.
data: st_rw_s2 TYPE i VALUE '2'.
data: st_cl_s2 TYPE i VALUE '1'.
data: ed_rw_s1 TYPE i VALUE '3'.
data: ed_cl_s1 TYPE i VALUE '7'.
data: ed_rw_s2 TYPE i VALUE '5'.
data: ed_cl_s2 TYPE i VALUE '8'.
DATA: excel_tab TYPE ty_t_sender,
excel_tab1 TYPE ty_t_sender.
DATA: ld_separator TYPE c.
DATA: application TYPE ole2_object,
workbook TYPE ole2_object,
sheet TYPE ole2_object,
range TYPE ole2_object,
worksheet TYPE ole2_object.
DATA: h_cell TYPE ole2_object,
h_cell1 TYPE ole2_object.
DATA: ld_rc TYPE i.
TYPE-POOLS ole2.
*AT SELECTION-SCREEN.
PARAMETERS: filename LIKE rlgrap-filename.
AT SELECTION-SCREEN ON VALUE-REQUEST FOR filename.
PERFORM value_help.
sTART-OF-SELECTION.
* CASE sy-ucomm .
* WHEN 'ONLI'.
PERFORM execute.
PERFORM bapi.
* ENDCASE.
* MESSAGE DEFINATION
DEFINE m_message.
case sy-subrc.
when 0.
when 1.
message id sy-msgid type sy-msgty number sy-msgno
with sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
when others. raise upload_ole.
endcase.
END-OF-DEFINITION.
*& Form VALUE_HELP
* text
* --> p1 text
* <-- p2 text
FORM VALUE_HELP .
CALL FUNCTION 'DSVAS_DOC_WS_FILENAME_GET_50'
EXPORTING
def_filename = ' '
def_path = ' '
mask = ',*.*,*.*.'
mode = 'O'
title = ' '
IMPORTING
filename = filename
EXCEPTIONS
inv_winsys = 1
no_batch = 2
selection_cancel = 3
selection_error = 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. " VALUE_HELP
*& Form EXECUTE
* text
* --> p1 text
* <-- p2 text
FORM EXECUTE .
* PARAMETER CHECK
IF st_rw_s1 > ed_rw_s1.
RAISE inconsistent_parameters.
ENDIF.
IF st_cl_s1 > ed_cl_s1.
RAISE inconsistent_parameters.
ENDIF.
IF st_rw_s2 > ed_rw_s2.
RAISE inconsistent_parameters.
ENDIF.
IF st_cl_s2 > ed_cl_s2.
RAISE inconsistent_parameters.
ENDIF.
CLASS cl_abap_char_utilities DEFINITION LOAD.
ld_separator = cl_abap_char_utilities=>horizontal_tab.
* OPENING EXCEL FILE
IF application-header = space OR application-handle = -1.
CREATE OBJECT application 'Excel.Application'.
m_message.
ENDIF.
CALL METHOD OF
application
'Workbooks' = workbook.
m_message.
CALL METHOD OF
application
'Workbooks' = workbook.
m_message.
CALL METHOD OF
workbook
'Open'
EXPORTING
#1 = filename.
m_message.
CALL METHOD OF
application
'Worksheets' = sheet
EXPORTING
#1 = 1.
m_message.
CALL METHOD OF
application
'Worksheets' = sheet
EXPORTING
#1 = 1.
m_message.
CALL METHOD OF
sheet
'Activate'.
m_message.
GET PROPERTY OF application 'ACTIVESHEET' = sheet.
m_message.
* MARKING OF WHOLE SPREADSHEET
CALL METHOD OF
sheet
'Cells' = h_cell
EXPORTING
#1 = st_rw_s1
#2 = st_cl_s1.
m_message.
CALL METHOD OF
sheet
'Cells' = h_cell1
EXPORTING
#1 = ed_rw_s1
#2 = ed_cl_s1.
m_message.
CALL METHOD OF
sheet
'RANGE' = range
EXPORTING
#1 = h_cell
#2 = h_cell1.
m_message.
CALL METHOD OF
range
'SELECT'.
m_message.
* Copy marked area (SHEET1) into Clippboard
CALL METHOD OF
range
'COPY'.
m_message.
* Read clipboard into ABAP
CALL METHOD cl_gui_frontend_services=>clipboard_import
IMPORTING
data = excel_tab
EXCEPTIONS
cntl_error = 1
* ERROR_NO_GUI = 2
* NOT_SUPPORTED_BY_GUI = 3
OTHERS = 4.
IF sy-subrc <> 0.
MESSAGE a037(alsmex).
ENDIF.
PERFORM separated_to_intern_convert TABLES excel_tab it_data1
USING ld_separator.
* Clear the clipboard
REFRESH excel_tab.
CALL METHOD cl_gui_frontend_services=>clipboard_export
IMPORTING
data = excel_tab
CHANGING
rc = ld_rc
EXCEPTIONS
cntl_error = 1
* ERROR_NO_GUI = 2
* NOT_SUPPORTED_BY_GUI = 3
OTHERS = 4.
* Working in Second Excel Work Sheet
CALL METHOD OF
application
'Worksheets' = sheet
EXPORTING
#1 = 2.
m_message.
CALL METHOD OF
sheet
'Activate'.
m_message.
GET PROPERTY OF application 'ACTIVESHEET' = sheet.
m_message.
* Mark Sheet2
CALL METHOD OF
sheet
'Cells' = h_cell
EXPORTING
#1 = st_rw_s2
#2 = st_cl_s2.
m_message.
CALL METHOD OF
sheet
'Cells' = h_cell1
EXPORTING
#1 = ed_rw_s2
#2 = ed_cl_s2.
m_message.
CALL METHOD OF
sheet
'RANGE' = range
EXPORTING
#1 = h_cell
#2 = h_cell1.
m_message.
CALL METHOD OF
range
'SELECT'.
m_message.
* Copy Marked Area (Sheet2) into Clippboard
CALL METHOD OF
range
'COPY'.
m_message.
* Read Clipboard into ABAP
CALL METHOD cl_gui_frontend_services=>clipboard_import
IMPORTING
data = excel_tab1
EXCEPTIONS
cntl_error = 1
* ERROR_NO_GUI = 2
* NOT_SUPPORTED_BY_GUI = 3
OTHERS = 4.
IF sy-subrc <> 0.
MESSAGE a037(alsmex).
ENDIF.
PERFORM separated_to_intern_convert TABLES excel_tab1 it_data2
USING ld_separator.
* Clear Clipboard
REFRESH excel_tab.
CALL METHOD cl_gui_frontend_services=>clipboard_export
IMPORTING
data = excel_tab1
CHANGING
rc = ld_rc
EXCEPTIONS
cntl_error = 1
* ERROR_NO_GUI = 2
* NOT_SUPPORTED_BY_GUI = 3
OTHERS = 4
* Leaving Application
CALL METHOD OF
application
'QUIT'.
m_message.
FREE OBJECT application.
m_message.
LOOP AT it_data1 INTO it_data_wa2.
IF temp_row ne it_data_wa2-ROW AND temp_row IS NOT INITIAL.
temp_row = it_data_wa2-ROW.
APPEND IT_HEADER.
ELSE.
temp_row = it_data_wa2-ROW.
ENDIF.
CASE it_data_wa2-COL.
WHEN '0001'.
IT_HEADER-ID = it_data_wa2-VALUE.
WHEN '0002'.
IT_HEADER-KUNNR = it_data_wa2-VALUE.
WHEN '0003'.
IT_HEADER-INV_DATE = it_data_wa2-value.
WHEN '0004'.
IT_HEADER-PST_DATE = it_data_wa2-VALUE.
WHEN '0005'.
IT_HEADER-REF = it_data_wa2-VALUE.
WHEN '0006'.
IT_HEADER-AMT_DOCCUR = it_data_wa2-VALUE.
WHEN '0007'.
IT_HEADER-TXT = it_data_wa2-VALUE.
ENDCASE.
ENDLOOP.
APPEND IT_HEADER.
CLEAR:temp_row.
LOOP AT it_data2 INTO it_data_wa ."WHERE ROW = it_data_wa2-ROW.
IF temp_row ne it_data_wa-ROW AND temp_row IS NOT INITIAL.
temp_row = it_data_wa-ROW.
APPEND IT_ITEM.
ELSEIF ( temp_row NE it_data_wa-ROW AND temp_row IS INITIAL ).
temp_row = it_data_wa-ROW.
* ELSE
ENDIF.
CASE it_data_wa-COL.
WHEN '0001'.
IT_ITEM-ID = it_data_wa-VALUE.
WHEN '0002'.
IT_ITEM-GL_ACCOUNT = it_data_wa-VALUE.
WHEN '0003'.
IT_ITEM-AMT_DOCCUR = it_data_wa-value.
WHEN '0004'.
IT_ITEM-ITEM_TEXT = it_data_wa-VALUE.
WHEN '0005'.
IT_ITEM-BUS_AREA = it_data_wa-VALUE.
WHEN '0006'.
IT_ITEM-KOSTL = it_data_wa-VALUE.
* WHEN '0007'.
* IT_ITEM-VAT = it_data_wa-VALUE.
ENDCASE.
ENDLOOP.
APPEND IT_ITEM.
ENDFORM. " EXECUTE
*ENDLOOP.
*& Form BAPI
* text
* --> p1 text
* <-- p2 text
FORM BAPI .
DATA: it_acc_gl LIKE bapiacgl09 OCCURS 0 WITH HEADER LINE,
it_acc_ap LIKE bapiacap09 OCCURS 0 WITH HEADER LINE,
it_acc_aR LIKE bapiacaR09 OCCURS 0 WITH HEADER LINE,
it_return LIKE bapiret2 OCCURS 0 WITH HEADER LINE,
it_curr_amt LIKE bapiaccr09 OCCURS 0 WITH HEADER LINE,
it_doc_header LIKE bapiache09 OCCURS 0 WITH HEADER LINE,
it_acc_tax LIKE bapiactx09 OCCURS 0 WITH HEADER LINE,
obj_type LIKE bapiache09-obj_type,
obj_key LIKE bapiache09-obj_key,
obj_sys LIKE bapiache09-obj_sys,
pstng_date LIKE it_doc_header-pstng_date,
doc_date LIKE it_doc_header-doc_date,
loop_cnt TYPE i VALUE 0,
gv_vendor(10) TYPE c,
gv_gl_acc(10) TYPE c.
DATA conv_s_amt TYPE BETRG.
DATA cur_line TYPE P.
data item_no type POSNR_ACC.
data item_no1 type POSNR_ACC.
CLEAR: obj_type, obj_sys, obj_key, pstng_date, doc_date, gv_vendor, gv_gl_acc.
* CLEAR: it_doc_header,it_acc_gl,it_curr_amt,IT_ACC_AR,IT_RETURN.
LOOP AT it_HEADER INTO WA_HEADER .
REFRESH it_doc_header.
it_doc_header-bus_act = 'RFBU'.
it_doc_header-username = sy-uname.
* it_doc_header = WA_HEADER-KUNNR." Customer Number
it_doc_header-header_txt = WA_HEADER-TXT." bdc_source-col_h. " Invoice Text
it_doc_header-comp_code = 'JPOL'."bdc_source-col_a. " Company Code
CONCATENATE WA_HEADER-INV_DATE+6(4) WA_HEADER-INV_DATE+3(2) WA_HEADER-INV_DATE(2)
into it_doc_header-doc_date.
CONCATENATE WA_HEADER-pst_date+6(4) WA_HEADER-pst_date+3(2) WA_HEADER-pst_date(2)
into it_doc_header-pstng_date.
it_doc_header-doc_type = 'DR'. " Return Order...?
it_doc_header-fisc_year = '2013'. " Return Order...?
it_doc_header-fis_period = '02'. " Return Order...?
it_doc_header-ref_doc_no = '123'."bdc_source-col_d. " Invoice Number
APPEND it_doc_header.
REFRESH it_acc_aR.
it_acc_aR-itemno_acc = '1'. " Invoice Number
it_acc_aR-customer = WA_HEADER-KUNNR. " Customer Number
it_acc_aR-comp_code = 'JPOL'. " Company Code
it_acc_aR-item_text = WA_HEADER-txt. " Line Item Text
APPEND it_acc_aR.
* it_acc_aR-itemno_acc = '4'. " Invoice Number
* it_acc_aR-customer = WA_HEADER-KUNNR. " Customer Number
* it_acc_aR-comp_code = 'JPOL'. " Company Code
* it_acc_aR-item_text = WA_HEADER-txt. " Line Item Text
* APPEND it_acc_aR.
REFRESH it_acc_gl.
REFRESH IT_CURR_AMT.
* ITEM_NO = 1.
"GL Information details collected
CLEAR : ITEM_NO,item_no1.
LOOP AT it_ITEM INTO WA_ITEM where id = wa_header-ID.
ITEM_NO = ITEM_NO + 1.
it_acc_gl-itemno_acc = ITEM_NO.
it_acc_gl-gl_account = WA_ITEM-GL_ACCOUNT."gv_gl_acc. " GL Account
it_acc_gl-item_text = WA_ITEM-ITEM_TEXT. "bdc_source-col_o. " Line Item Text
it_acc_gl-doc_type = 'DR'. " Return Order...?
it_acc_gl-comp_code = 'JPOL'."bdc_source-col_a. " Company Code
it_acc_gl-bus_area = WA_ITEM-BUS_AREA."bdc_source-col_a. " Company Code
it_acc_gl-CUSTOMER = WA_HEADER-KUNNR.
conv_s_amt = WA_ITEM-AMT_DOCCUR."bdc_source-col_f. " Invoice Amount
IF conv_s_amt < 0.
it_acc_gl-de_cre_ind = 'H'. " H-Credit
conv_s_amt = - conv_s_amt.
ELSE.
it_acc_gl-de_cre_ind = 'S'. " S-Debit
ENDIF.
APPEND it_acc_gl.
ITEM_NO1 = ITEM_NO1 + 1.
it_curr_amt-itemno_acc = ITEM_NO1 . " Invoice Number
it_curr_amt-curr_type = '00'.
it_curr_amt-currency = 'INR'. " Currancy
it_curr_amt-amt_doccur = conv_s_amt . " Line Item Amount
APPEND it_curr_amt.
ITEM_NO1 = ITEM_NO1 + 1.
it_curr_amt-itemno_acc = ITEM_NO1 . " Invoice Number
it_curr_amt-curr_type = '00'.
it_curr_amt-currency = 'INR'. " Currancy
it_curr_amt-amt_doccur = conv_s_amt * -1. " Line Item Amount
APPEND it_curr_amt.
ENDLOOP.
REFRESH it_return.
"Customer Invoice
* Do the post to GL Account and AP
CALL FUNCTION 'BAPI_ACC_DOCUMENT_POST'
EXPORTING
documentheader = it_doc_header
IMPORTING
obj_type = obj_type
obj_key = obj_key
obj_sys = obj_sys
TABLES
accountgl = it_acc_gl
currencyamount = it_curr_amt
accountreceivable = it_acc_aR
return = it_return.
CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'
EXPORTING
wait = 'X'.
* Check for any errors
WRITE : obj_key.
LOOP at IT_RETURN WHERE TYPE = 'E'.
WRITE : / 'Error :', IT_RETURN-MESSAGE .
endloop.
ENDLOOP.
ENDFORM. " BAPI
Result:Hi
Thank you for your help i did small modification i mention code below
REPORT ZCUS_INVOICE.
data: BEGIN OF WA_HEADER,
ID TYPE I,
KUNNR TYPE n LENGTH 10,
INV_DATE TYPE c LENGTH 10,
PST_DATE TYPE c LENGTH 10,
REF TYPE invfo-xblnr,
PRD_TEXT TYPE BAPIACGL09-ITEM_TEXT,
CMP_CODE TYPE BAPIACGL09-COMP_CODE,
AMT_DOCCUR TYPE PA2010-BETRG,
TXT(40),
END OF WA_HEADER.
DATA : IT_HEADER like WA_HEADER OCCURS 0 WITH HEADER LINE.
data: BEGIN OF WA_ITEM,
ID TYPE I,
GL_ACCOUNT TYPE n LENGTH 10,
ITEM_TEXT TYPE BAPIACGL09-ITEM_TEXT,
BUS_AREA TYPE BAPIACGL09-BUS_AREA,
AMT_DOCCUR TYPE BAPIACCR09-AMT_DOCCUR,
KOSTL TYPE CSKT-KOSTL,
* VAT(2),
END OF WA_ITEM.
DATA : IT_ITEM like WA_ITEM OCCURS 0 WITH HEADER LINE.
* value of excel-cell
TYPES: ty_d_itabvalue TYPE alsmex_tabline-value,
* internal table containing the excel data
ty_t_itab TYPE alsmex_tabline OCCURS 0,
* line type of sender table
BEGIN OF ty_s_senderline,
line(4096) TYPE c,
END OF ty_s_senderline,
* sender table
ty_t_sender TYPE ty_s_senderline OCCURS 0.
CONSTANTS: gc_esc VALUE '"'.
DATA temp_row TYPE I.
DATA TEMP(4).
INCLUDE lalsmexf01.
DATA: it_data1 TYPE ty_t_itab.
DATA: it_data2 TYPE ty_t_itab.
DATA: it_data_wa LIKE LINE OF it_data1.
DATA: it_data_wa2 LIKE LINE OF it_data1.
* DATA DECLARATION
data: st_rw_s1 TYPE i value '2'.
data: st_cl_s1 TYPE i value '1'.
data: st_rw_s2 TYPE i value '2'.
data: st_cl_s2 TYPE i value '1'.
data: ed_rw_s1 TYPE i value '50'.
data: ed_cl_s1 TYPE i value '9'.
data: ed_rw_s2 TYPE i value '50'.
data: ed_cl_s2 TYPE i value '6'.
DATA: excel_tab TYPE ty_t_sender,
excel_tab1 TYPE ty_t_sender.
DATA: ld_separator TYPE c.
DATA: application TYPE ole2_object,
workbook TYPE ole2_object,
sheet TYPE ole2_object,
range TYPE ole2_object,
worksheet TYPE ole2_object.
DATA: h_cell TYPE ole2_object,
h_cell1 TYPE ole2_object.
DATA: ld_rc TYPE i.
TYPE-POOLS ole2.
*AT SELECTION-SCREEN.
PARAMETERS: filename LIKE rlgrap-filename.
AT SELECTION-SCREEN ON VALUE-REQUEST FOR filename.
PERFORM value_help.
sTART-OF-SELECTION.
* CASE sy-ucomm .
* WHEN 'ONLI'.
PERFORM execute.
PERFORM bapi.
* ENDCASE.
* MESSAGE DEFINATION
DEFINE m_message.
case sy-subrc.
when 0.
when 1.
message id sy-msgid type sy-msgty number sy-msgno
with sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
when others. raise upload_ole.
endcase.
END-OF-DEFINITION.
*& Form VALUE_HELP
* text
* --> p1 text
* <-- p2 text
FORM VALUE_HELP .
CALL FUNCTION 'DSVAS_DOC_WS_FILENAME_GET_50'
EXPORTING
def_filename = ' '
def_path = ' '
mask = ',*.*,*.*.'
mode = 'O'
title = ' '
IMPORTING
filename = filename
EXCEPTIONS
inv_winsys = 1
no_batch = 2
selection_cancel = 3
selection_error = 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. " VALUE_HELP
*& Form EXECUTE
* text
* --> p1 text
* <-- p2 text
FORM EXECUTE .
* PARAMETER CHECK
IF st_rw_s1 > ed_rw_s1.
RAISE inconsistent_parameters.
ENDIF.
IF st_cl_s1 > ed_cl_s1.
RAISE inconsistent_parameters.
ENDIF.
IF st_rw_s2 > ed_rw_s2.
RAISE inconsistent_parameters.
ENDIF.
IF st_cl_s2 > ed_cl_s2.
RAISE inconsistent_parameters.
ENDIF.
CLASS cl_abap_char_utilities DEFINITION LOAD.
ld_separator = cl_abap_char_utilities=>horizontal_tab.
* OPENING EXCEL FILE
IF application-header = space OR application-handle = -1.
CREATE OBJECT application 'Excel.Application'.
m_message.
ENDIF.
CALL METHOD OF
application
'Workbooks' = workbook.
m_message.
CALL METHOD OF
application
'Workbooks' = workbook.
m_message.
CALL METHOD OF
workbook
'Open'
EXPORTING
#1 = filename.
m_message.
CALL METHOD OF
application
'Worksheets' = sheet
EXPORTING
#1 = 1.
m_message.
CALL METHOD OF
application
'Worksheets' = sheet
EXPORTING
#1 = 1.
m_message.
CALL METHOD OF
sheet
'Activate'.
m_message.
GET PROPERTY OF application 'ACTIVESHEET' = sheet.
m_message.
* MARKING OF WHOLE SPREADSHEET
CALL METHOD OF
sheet
'Cells' = h_cell
EXPORTING
#1 = st_rw_s1
#2 = st_cl_s1.
m_message.
CALL METHOD OF
sheet
'Cells' = h_cell1
EXPORTING
#1 = ed_rw_s1
#2 = ed_cl_s1.
m_message.
CALL METHOD OF
sheet
'RANGE' = range
EXPORTING
#1 = h_cell
#2 = h_cell1.
m_message.
CALL METHOD OF
range
'SELECT'.
m_message.
* Copy marked area (SHEET1) into Clippboard
CALL METHOD OF
range
'COPY'.
m_message.
* Read clipboard into ABAP
CALL METHOD cl_gui_frontend_services=>clipboard_import
IMPORTING
data = excel_tab
EXCEPTIONS
cntl_error = 1
* ERROR_NO_GUI = 2
* NOT_SUPPORTED_BY_GUI = 3
OTHERS = 4.
IF sy-subrc <> 0.
MESSAGE a037(alsmex).
ENDIF.
PERFORM separated_to_intern_convert TABLES excel_tab it_data1
USING ld_separator.
* Clear the clipboard
REFRESH excel_tab.
CALL METHOD cl_gui_frontend_services=>clipboard_export
IMPORTING
data = excel_tab
CHANGING
rc = ld_rc
EXCEPTIONS
cntl_error = 1
* ERROR_NO_GUI = 2
* NOT_SUPPORTED_BY_GUI = 3
OTHERS = 4.
* Working in Second Excel Work Sheet
CALL METHOD OF
application
'Worksheets' = sheet
EXPORTING
#1 = 2.
m_message.
CALL METHOD OF
sheet
'Activate'.
m_message.
GET PROPERTY OF application 'ACTIVESHEET' = sheet.
m_message.
* Mark Sheet2
CALL METHOD OF
sheet
'Cells' = h_cell
EXPORTING
#1 = st_rw_s2
#2
Maybe you are looking for
-
Entering 2nd Inv with UNplanned deliv costs
Hi all, In MIRO, after all the invoices are entered against the PO and all are passed for payment (No payment block) and if the vendor sends another invoice with just additional UNplanned Delivery costs..... How do I enter this invoice? Is this a "Su
-
Hi, I need to delete entries in the table ,those may be anywhere between 1 to several thousand. If I want to delete for every hundred records how could it be coded. Thanks, Kranthi.
-
Printer error message Printer hp LaserJet CP1525nw Windows 7 The following message is displayed when sending any file to the above printer. "hpmns115.dll has stopped working"
-
Can I download the lesson files for Dreamweaver CS6 classroom in a book?
I bought a used copy of Adobe Dreamweaver CS6 classroom in a book and the disc wasn't with it. Can I download the lesson files somewhere? Thanks, Rich
-
Hi all , I new to LE , please let me know the complete cycle of process of Logisctics excution. what are the step by step process and transcation STO PO , Delivery ,PGI ,Shippment , Billing . What does it mean... Please give me ....definition best re