Data fetching from Standard tables or transaction to SAP PI
Dear Friends !
Good day ! How are you ?
I have one requirement , My client asks me to develop a solution in that I should get the data from standard SAP tables like EKKO, EKPO ( MM related ) etc.. and send it to PI system and then PI system sends it to third party system database system.
We have current scenario is working fine, I have abap proxy that I called in various standard transaction codes ( MIRO, MIGO, etc ) ' Baddis just beforethe commit stament and it passed the data to SAP PI system and it sends to SQL system.
but my client dont want me to use Baddis. Client wants like u should read from those EKKO,EKPO tables as soon as you get new entry there and send it to PI system. I have no clue How can I go further in that. Shall I use events ? but then question is same I need to trgger them somewere? Is any one have idea How I can send the data to PI system frm SAP standard tcodes and tables without using Baddis.
Please reply me. your any help will be appreciated.
Regards
Naeem
The current Approach of your development perfectly good approach,
it is not possbiel to read data directly from SAP Tables, you have to use IDoc/RFC/Proxy,if you want to avoid BADI's then better to contact ABAP Team, they will help you different approches .
But you have to use Porxy/IDoc/BAPI for sure.
Regards,
Raj
Similar Messages
-
Hi,
I have used smartforms for generating suppler payment statement for financial department. more time duration is taken by the program when it is generating.
I think this problem comes while data fetching from BSEG table. because, it has more records for one vendor ID.
I want reduce this time duration.
Please guide me.Have you tried this selection in se16? I'm quite sure that It will take
a long time.
The problem has been explained in this group before and I think you
should search for bseg in the answers given.
As a hint: It has to do with the selection universe. You are restricting
only bukrs from the primary key (all the other restrictions in your
where clause are filters that are applied on SAP's side (not on the
database side)). The problem is that bseg isn't stored as separated
fields in the RDBMS, but as a table with the primary key and a stream of
bits in a raw field.
You should review and change the logic you're using before reading bseg.
It's the only way you'll improve the performance of this select. (for
example, you could use one or more secondary index tables - bi or ba
to retrieve belnr and access bseg with a better where clause). -
Perofrmance issue on data fetch from db table
Dear Experts,
I have one requirement which explained below step wise.
Step - 1 : I have a parameter on selection screen from where i ll get my ebeln value (User Input field) and that ebeln i ll check in ekpo table for validations.
If valid i keep it in a variable gw_ebeln.
Step - 2 : Need to fetch lifnr fron ekko based on gw_ebeln value.
Step - 3 : Need to fetch adrnr from lfa1 based on lifnr (Previously fetched from ekko table in step 2)
Step - 4 : Need to fetch email field from adr6 table based on adrnr value (Previously fetched from lfa1 table in step 3)
Step - 5 : Now for these mail id , I need to send mail by given fm.
My question is : I can create structure for step 2 , step 3, step 4 and by using " for all entries " in select statement i ll fetch my mail id in step 4.
So instead of creating structure and then use for all entries , I can fetch by using "select single" statement for step 2 , step3 step 4.bcz i am fetching only one field from all 3 table.
So which one is better performance wise and why ?
I need more and clear clarifications on these difference.
Please provide me suggestions.
Thanks & Regards,
Ajit SarangiHi Ajit,
We are referring item table EKPO. Multiple entries are possible.
To append the values in final internal table, we are going to process the LOOP. Inside loop, we should not use the Select statement, that decreases the performance. Database Interaction process should not done inside Loop...Endloop.
That's why we are creating the Internal table for processing the values. Since we need limited number of fields in the particular table, we are creating our own structure in the program.
For this case, For all entries will give better performance with compare to Select Single.
Regards
Rajkumar Narsimman -
Data fetch from two table without refresh
hi Friends,
I have a problem i want to extract data from two table without refresh into text field when i'll enter any value in a text field then corressponding value should come in to corressponding textfield.
eg. there two table A and B.
Table A has Colunm
s_id Number;
c_id Varchar2(30);
sec varchar2(4);
Second Table B Colunm Name
s_id Number;
f_name varchar(30);
l_name varchar(20);
when i enter s_id 101 in a text field then the c_id ,sec,first_name and last_name should come in to corressponding text fields without refresh.
How Can I do this.
Thanks
ManojHi Manoj,
You have to make an Ajax call to display data without refreshing the page. Search this forum for Ajax and you can find lots of related posts. This link might help too. http://www.dba-oracle.com/t_html_db_apex_ajax_application_express.htm
Thanks,
Manish. -
How to Fetch Data From Standard Table MARA and Display using BOPF ?
Hello All,
In BOPF creation of Quey to a node fetches data from the Data Base Table attached to that Node,
But in my requirement I have to fetch data Present in a Standard table and Display it in the FPM List Using FBI.
** Can we Fetch the data From Standard Table and fill the Node in BOPF, Is this possible as the standard Table do not contain KEY field which BOPF uses for Data Fetching ?
Kindly share your Idea's .
Thanks in Adv.Hi Dhivya,
Thanks For your Response.
In my Requirement I want to make ROOT Node as Transient Node.
When I create a Sub Node to a Root Node, I am able to get this option to make this sub node as a Transient Node .
By selecting 'Standard<-->Extended' option in the Menu item 'GoTo' I am able to get this Transient Node check box field for the Sub Nodes.
I want to make a ROOT Node as a Transient Node.
(Which Version you are using, and which transaction you are using to create BO . we are using BOBX Transaction, Version Ehp 6 )
Kindly Guide me .
Thanks,
Kranthi Kumar. -
Data retrival from standard transaction with in a report
hi all,
i have a requirement like i need to pass the selection screen selections to a standard transaction ca80 and need to get the material list from there to my report for furthur processing. is it possible with bdc or a bapi for this.
can anyone please help urgent its eating my brain. points awarded for solution
thanks in advance
anupamahi deep kammula,
this is a sample code for your query just check. it may help you.
all the best.
reward me points if usefull.
Sample HR Reports - Allocate Petrol Allowance
Two ABAP HR Programs, which are interconnected, the first takes employee numbers which should not be given Petrol allowance and the other program gives the petrol allowance to employees.
FIRST PRG
REPORT ZPETROL_EXCLUDE .
TABLES SSCRFIELDS.
SELECTION-SCREEN BEGIN OF SCREEN 100.
SELECTION-SCREEN SKIP 9.
PARAMETERS NUMBER(200) TYPE C.
SELECTION-SCREEN SKIP 2.
SELECTION-SCREEN:
BEGIN OF LINE,
PUSHBUTTON 2(10) TEXT-001 USER-COMMAND PROC,
END OF LINE.
SELECTION-SCREEN END OF SCREEN 100.
CALL SCREEN 100.
AT SELECTION-SCREEN.
CASE SSCRFIELDS.
WHEN 'PROC'.
SET PARAMETER ID: 'NUM' FIELD NUMBER.
CALL TRANSACTION 'ZP_PALLOWANCE'.
LEAVE TO SCREEN 0.
ENDCASE.
SECOND PRG
REPORT ZPR_PETROL_ALLOWANCE NO STANDARD PAGE
HEADING .
*-- Infotypes
INFOTYPES : 0000, "Actions
0002, "Personal Data
0008. "Basic pay details
*-- Tables
TABLES : PERNR, "Standard Selections for HR Master Data Reporting
PC207, "Payroll Results: Results Table
PCL1, "HR Cluster 1
PCL2, "HR Cluster 2
T510, "Pay scales
T549A, "Payroll areas
T549Q, "Payroll Periods
PA0002. "Personal details
*-- Internal Tables
*-- Internal Table Declaration For Holding The Data
DATA: BEGIN OF INT_PETROL OCCURS 0,
PERNR LIKE PA0008-PERNR, "Personnel Number
TRFST LIKE PA0008-TRFST, "Pay Scale Level
NAME(40), "Name of Employee
PALLOWANCE TYPE P DECIMALS 2, "Petrol Allowance Amount
END OF INT_PETROL.
DATA: BEGIN OF PA0015_DATA OCCURS 0,
PERNR LIKE PA0015-PERNR,
BETRG LIKE PA0015-BETRG,
END OF PA0015_DATA.
DATA:BEGIN OF INT_PETROL2 OCCURS 0,
PERNR LIKE PA0008-PERNR, "Personnel Number
VORNA LIKE PA0002-VORNA, "First Name
NACHN LIKE PA0002-NACHN, "Last Name
TRFST LIKE PA0008-TRFST, "Pay Scale Level
NAME(40), "Name of Employee
PALLOWANCE TYPE P DECIMALS 2, "Petrol Allowance Amount
END OF INT_PETROL2.
DATA : TITLE TYPE LVC_TITLE.
DATA: BEGIN OF PER_NO OCCURS 0,
PERNR LIKE PA0008-PERNR,
TRFST LIKE PA0008-TRFST,
END OF PER_NO.
DATA: BEGIN OF MSG OCCURS 0,
MSG1(100) TYPE C,
END OF MSG.
DATA: FLAG TYPE I VALUE '0',
DIS_FLAG TYPE I VALUE '0'.
DATA: INT_PETROL3 LIKE STANDARD TABLE OF INT_PETROL2 INITIAL SIZE 0
WITH HEADER LINE.
DATA: INT_PETROL1 LIKE STANDARD TABLE OF INT_PETROL INITIAL SIZE 0 WITH
HEADER LINE.
DATA: WA_PET_ALLOWANCE TYPE ZBPETROL_ALL. "WORKAREA FOR INSERTING
VALUES.
*DATA: P_LGART1 LIKE T512T-LGART VALUE '0010'. "CHANGE WAGE TYPE HERE
DATA: P_LGART1 LIKE T512T-LGART VALUE '0077'. "CHANGE WAGE TYPE HERE
DATA: BEGIN OF INT_0015 OCCURS 0,
PERNR(038),
BEGDA(010),
BETRG(018),
END OF INT_0015.
*-- Internal Table To Store Error Records.
DATA: E_INT_0015 LIKE INT_0015 OCCURS 0 WITH HEADER LINE.
*-- Batch Input Data of Single Transaction
DATA: BDCDATA LIKE BDCDATA OCCURS 0 WITH HEADER LINE.
*-- Internal Table For Export and Import Payroll Results
DATA: INT_RGDIR LIKE PC261 OCCURS 0 WITH HEADER LINE,
LGTXT LIKE T512T-LGTXT.
DATA: BEGIN OF EMP_NO OCCURS 0,
PERNR(4) TYPE C,
END OF EMP_NO.
DATA: BEGIN OF EMP_NO1 OCCURS 0,
PERNR TYPE I,
END OF EMP_NO1.
DATA EMPNO LIKE STANDARD TABLE OF EMP_NO INITIAL SIZE 0.
DATA EMPNO1 LIKE STANDARD TABLE OF EMP_NO1 INITIAL SIZE 0 WITH HEADER
LINE.
DATA LEN1 TYPE I.
DATA: ERR LIKE MESSAGE.
DATA TEMP_NUM(200) TYPE C.
*-- Includes
*-- International Include
INCLUDE RPC2CD09. "Cluster CD data definition
INCLUDE RPC2CA00. "Cluster CA Data-Definition
INCLUDE RPPPXD00. "Data Definition buffer PCL1/PCL2 Buffer INCLUDE RPPPXD10.
"Common part buffer PCL1/PCL2 INCLUDE RPPPXM00. "Buffer Handling routine
*-- Country Specific Include
INCLUDE PC2RXIN0. "Cluster IN data definition
INCLUDE RPC2RX09.
*-- ALV Declaration
TYPE-POOLS : SLIS.
DATA: INT_FIELDCAT TYPE SLIS_T_FIELDCAT_ALV WITH HEADER LINE,
INT_EVENTS TYPE SLIS_T_EVENT,
INT_LAYOUT TYPE SLIS_LAYOUT_ALV,
WS_EVENTS TYPE SLIS_ALV_EVENT,
WS_REPID LIKE SY-REPID.
*-- Initialization
INITIALIZATION.
WS_REPID = SY-REPID.
*-- At Selection-Screen
START-OF-SELECTION.
SELECTION-SCREEN BEGIN OF BLOCK B1 WITH FRAME TITLE TEXT-001.
SELECTION-SCREEN BEGIN OF LINE.
SELECTION-SCREEN COMMENT 1(30) TEXT-002.
SELECTION-SCREEN POSITION 33.
PARAMETERS: P_RATE TYPE P DECIMALS 2.
SELECTION-SCREEN END OF LINE.
SELECTION-SCREEN END OF BLOCK B1.
SELECTION-SCREEN BEGIN OF BLOCK B2 WITH FRAME TITLE TEXT-003.
SELECTION-SCREEN BEGIN OF BLOCK B3.
PARAMETERS: P_UPLOAD AS CHECKBOX,
P_FG RADIOBUTTON GROUP G1,
P_BG RADIOBUTTON GROUP G1.
SELECTION-SCREEN END OF BLOCK B3.
SELECTION-SCREEN BEGIN OF BLOCK B4.
PARAMETERS: P_DI AS CHECKBOX.
SELECTION-SCREEN END OF BLOCK B4.
SELECTION-SCREEN END OF BLOCK B2.
AT SELECTION-SCREEN.
*-- Wate Type Text
SELECT SINGLE LGTXT INTO LGTXT FROM T512T WHERE SPRSL = 'E' AND
MOLGA = '40' AND LGART = P_LGART1 .
*-- Data Retrieval From Logical Database PNP
GET PERNR.
PROVIDE PERNR FROM P0000 VORNA NACHN FROM P0002 BETWEEN PN-BEGDA AND
PN-ENDDA.
INT_PETROL1-PERNR = P0000-PERNR.
CONCATENATE P0002-VORNA P0002-NACHN INTO INT_PETROL1-NAME SEPARATED
BY SPACE.
ENDPROVIDE.
*-- Clear Data
CLEAR: RGDIR, INT_RGDIR.
REFRESH: RGDIR, INT_RGDIR.
*-- Read All The Payroll Runs For An Employee
CD-KEY-PERNR = PERNR-PERNR.
RP-IMP-C2-CU.
CHECK RP-IMP-CD-SUBRC EQ 0.
*-- Clear Data
REFRESH: RT.
Read IN Cluster.
LOOP AT RGDIR WHERE FPBEG >= PN-BEGDA AND FPEND <= PN-ENDDA.
MOVE-CORRESPONDING RGDIR TO INT_RGDIR.
APPEND INT_RGDIR.
CLEAR INT_RGDIR.
ENDLOOP.
Read the last record.
SORT INT_RGDIR BY SEQNR DESCENDING.
READ TABLE INT_RGDIR INDEX 1.
RX-KEY-SEQNO = INT_RGDIR-SEQNR.
RX-KEY-PERNR = PERNR-PERNR.
RP-IMP-C2-IN.
CHECK RP-IMP-IN-SUBRC EQ 0.
READ TABLE RT WITH KEY LGART = P_LGART1.
IF SY-SUBRC = 0.
INT_PETROL1-PALLOWANCE = RT-BETRG.
ENDIF.
APPEND INT_PETROL1.
CLEAR INT_PETROL1.
SELECT TRFST PERNR
INTO CORRESPONDING FIELDS OF TABLE PER_NO
FROM PA0008
WHERE TRFST LIKE 'L%'
AND BET01 > 0.
SORT PER_NO.
DELETE ADJACENT DUPLICATES FROM PER_NO.
*-- END-OF-SELECTION.
END-OF-SELECTION.
LOOP AT INT_PETROL1.
READ TABLE PER_NO WITH KEY PERNR = INT_PETROL1-PERNR.
IF SY-SUBRC = 0.
INT_PETROL-TRFST = PER_NO-TRFST.
MODIFY INT_PETROL1 FROM INT_PETROL TRANSPORTING TRFST.
ENDIF.
ENDLOOP.
SORT INT_PETROL1.
DELETE ADJACENT DUPLICATES FROM INT_PETROL1.
CONCATENATE 'From' ' : ' PN-BEGDA6(2) '.' PN-BEGDA4(2) '.' PN-
BEGDA+0(4)
' To' ' : ' PN-ENDDA6(2) '.' PN-ENDDA4(2) '.' PN-ENDDA+0(4)
INTO TITLE.
IF P_DI = 'X'. "TO DISPLAY PETROL ALLOWANCE ONLY
IF PNPTIMRA = 'X'. "CHECK OTHER PERIOD CHECKED
DIS_FLAG = 1.
ENDIF.
IF PNPTIMR9 = 'X'. "CHECK TO SEE CURRENT PERIOD SELECTED
CASES - NO RATE GIVEN, RATE GIVEN
CURRENT PERIOD UPLOADED BUT PAYROLL NOT WRITTEN SO NO RESULT FROM LDB
SELECT RATE INTO P_RATE FROM ZBPETROL_ALL WHERE BEGDA = PN- BEGDA AND ENDDA = PN-ENDDA.
ENDSELECT.
IF SY-DBCNT = 0.
MESSAGE I455(0) WITH 'NO PETROL RATE EXSISTS'.
ELSE.
FLAG = 1.
ENDIF. "OF SY-DBCNT
IF P_RATE > 0 AND FLAG = 1. " PETROL RATE EXSISTS.
SELECT PERNR SUM( BETRG ) INTO TABLE PA0015_DATA
FROM PA0015
WHERE BEGDA BETWEEN PN-BEGDA AND PN-ENDDA
GROUP BY PERNR.
SELECT APERNR ATRFST BVORNA BNACHN
INTO CORRESPONDING FIELDS OF TABLE INT_PETROL3
FROM PA0008 AS A
INNER JOIN PA0002 AS B ON BPERNR = APERNR
WHERE A~TRFST LIKE 'L%'
AND A~BET01 > 0.
SORT INT_PETROL3.
DELETE ADJACENT DUPLICATES FROM INT_PETROL3.
REFRESH INT_PETROL1.
LOOP AT INT_PETROL3 INTO INT_PETROL2. "loop to transport
employee name
CONCATENATE INT_PETROL2-VORNA INT_PETROL2-NACHN INTO
INT_PETROL2-NAME SEPARATED BY SPACE.
MODIFY INT_PETROL3 FROM INT_PETROL2 TRANSPORTING NAME.
ENDLOOP.
LOOP AT INT_PETROL3 INTO INT_PETROL2. "loop to transport
one
table to another table
READ TABLE PA0015_DATA WITH KEY PERNR = INT_PETROL2-PERNR.
IF SY-SUBRC = 0.
INT_PETROL-PERNR = INT_PETROL2-PERNR.
INT_PETROL-TRFST = INT_PETROL2-TRFST.
INT_PETROL-NAME = INT_PETROL2-NAME.
INT_PETROL-PALLOWANCE = PA0015_DATA-BETRG.
APPEND INT_PETROL TO INT_PETROL1.
ENDIF.
ENDLOOP.
DIS_FLAG = 1.
ENDIF. "P_RATE > 0 AND FLAG = 1.
IF P_RATE > 0 AND FLAG = 0. "CURRENT PERIOD AND DATA NOT UPLOADED
SELECT APERNR ATRFST BVORNA BNACHN
INTO CORRESPONDING FIELDS OF TABLE INT_PETROL3
FROM PA0008 AS A
INNER JOIN PA0002 AS B ON BPERNR = APERNR
WHERE A~TRFST LIKE 'L%'
AND A~BET01 > 0.
SORT INT_PETROL3.
DELETE ADJACENT DUPLICATES FROM INT_PETROL3.
REFRESH INT_PETROL1.
LOOP AT INT_PETROL3 INTO INT_PETROL2. "loop to transport
employee name
CONCATENATE INT_PETROL2-VORNA INT_PETROL2-NACHN INTO
INT_PETROL2-NAME SEPARATED BY SPACE.
MODIFY INT_PETROL3 FROM INT_PETROL2 TRANSPORTING NAME.
ENDLOOP.
PERFORM GET_VALUE. "TO CONVERT THE FIRST SCREEN PERNR INTO
NUMBER FORMATE
LOOP AT INT_PETROL3 INTO INT_PETROL2. "loop to transport
one
table to another table
READ TABLE EMPNO1 WITH KEY PERNR = INT_PETROL2-PERNR.
IF SY-SUBRC <> 0.
INT_PETROL-PERNR = INT_PETROL2-PERNR.
INT_PETROL-TRFST = INT_PETROL2-TRFST.
INT_PETROL-NAME = INT_PETROL2-NAME.
APPEND INT_PETROL TO INT_PETROL1.
ENDIF.
ENDLOOP.
PERFORM CAL_ALLOWANCE.
ENDIF. " OF P_RATE > 0
DIS_FLAG = 1.
ENDIF. " OF CURRENT PERIOD CHECK.
ENDIF. " OF CHECK DISPLAY.
*----BDC
IF P_UPLOAD = 'X'.
IF PNPTIMRA = 'X'. "CHECK OTHER PERIOD CHECKED
MESSAGE I455(0) WITH 'Petrol Allowance cannot be uploaded'.
LEAVE SCREEN.
ENDIF.
IF P_RATE > 0.
IF P_RATE > 0 OR P_RATE = 0.
IF PNPTIMR9 = 'X'. "CHECK TO SEE CURRENT PERIOD SELECTED
WA_PET_ALLOWANCE-BEGDA = PN-BEGDA.
WA_PET_ALLOWANCE-ENDDA = PN-ENDDA.
WA_PET_ALLOWANCE-RATE = P_RATE.
WA_PET_ALLOWANCE-CURR = 'INR'.
INSERT INTO ZBPETROL_ALL VALUES WA_PET_ALLOWANCE.
SELECT A~PERNR A~TRFST B~VORNA B~NACHN
INTO CORRESPONDING FIELDS OF TABLE INT_PETROL3
FROM PA0008 AS A
INNER JOIN PA0002 AS B ON B~PERNR = A~PERNR
WHERE A~TRFST IN ('L1' , 'L2' , 'L3')
AND A~BET01 > 0.
SORT INT_PETROL3.
DELETE ADJACENT DUPLICATES FROM INT_PETROL3.
REFRESH INT_PETROL1.
LOOP AT INT_PETROL3 INTO INT_PETROL2. "loop to transport
employee name
CONCATENATE INT_PETROL2-VORNA INT_PETROL2-NACHN INTO
INT_PETROL2-NAME SEPARATED BY SPACE.
MODIFY INT_PETROL3 FROM INT_PETROL2 TRANSPORTING NAME.
ENDLOOP.
PERFORM GET_VALUE. "TO CONVERT THE FIRST SCREEN PERNR INTO
NUMBER FORMATE
LOOP AT INT_PETROL3 INTO INT_PETROL2. "loop to transport
one
table to another table
READ TABLE EMPNO1 WITH KEY PERNR = INT_PETROL2-PERNR.
IF SY-SUBRC <> 0.
INT_PETROL-PERNR = INT_PETROL2-PERNR.
INT_PETROL-TRFST = INT_PETROL2-TRFST.
INT_PETROL-NAME = INT_PETROL2-NAME.
APPEND INT_PETROL TO INT_PETROL1.
ENDIF.
ENDLOOP.
PERFORM CAL_ALLOWANCE.
DIS_FLAG = 1.
SORT INT_PETROL1.
LOOP AT INT_PETROL1.
MOVE: INT_PETROL1-PERNR TO INT_0015-PERNR,
INT_PETROL1-PALLOWANCE TO INT_0015-BETRG.
CONCATENATE PN-ENDDA6(2) PN-ENDDA4(2) PN-ENDDA+0(4) INTO
INT_0015-BEGDA SEPARATED BY '.'.
APPEND INT_0015.
CLEAR INT_0015.
ENDLOOP.
LOOP AT INT_0015.
PERFORM F_BDCDATA.
IF P_FG = 'X'.
CALL TRANSACTION 'PA30' USING BDCDATA MODE 'A' UPDATE 'S'.
ELSE.
CALL TRANSACTION 'PA30' USING BDCDATA MODE 'N' UPDATE 'S'.
ENDIF.
*-- Handling Error records.
IF SY-SUBRC <> 0.
*-- Handling Error Messages
PERFORM ERROR_MSG.
MOVE-CORRESPONDING INT_0015 TO E_INT_0015.
APPEND E_INT_0015.
CLEAR E_INT_0015.
ENDIF.
REFRESH BDCDATA.
ENDLOOP.
*-- Downloading Error Records.
CALL FUNCTION 'GUI_DOWNLOAD'
EXPORTING
FILENAME = 'C:\Errors.Txt'
FILETYPE = 'ASC'
TABLES
DATA_TAB = E_INT_0015.
*-- Downloading Error Messages.
CALL FUNCTION 'GUI_DOWNLOAD'
EXPORTING
FILENAME = 'C:\Err_Msg.Txt'
FILETYPE = 'ASC'
TABLES
DATA_TAB = MSG.
ENDIF. " FOR CURRENT PERIOD
ENDIF.
ELSE.
MESSAGE I455(0) WITH 'Enter Petrol Rate'.
LEAVE TO SCREEN 0.
ENDIF. " FOR PETROL RATE
ENDIF. " FOR UPLOAD
IF DIS_FLAG = 1.
INT_LAYOUT-SUBTOTALS_TEXT = TEXT-004.
INT_LAYOUT-TOTALS_TEXT = TEXT-004.
INT_LAYOUT-ZEBRA = 'X'.
PERFORM FILL_FIELDCAT.
PERFORM GET_EVENTS_ALV.
CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
EXPORTING
I_CALLBACK_PROGRAM = WS_REPID
IS_LAYOUT = INT_LAYOUT
IT_FIELDCAT = INT_FIELDCAT[]
I_DEFAULT = 'X'
I_SAVE = 'X'
IT_EVENTS = INT_EVENTS
TABLES
T_OUTTAB = INT_PETROL1
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.
ENDIF.
*& Form GET_VALUE
text
FORM GET_VALUE.
GET PARAMETER ID: 'NUM' FIELD TEMP_NUM.
IF TEMP_NUM <> ''.
LEN1 = STRLEN( TEMP_NUM ).
PERFORM GET_PERNR.
APPEND TEMP_NUM TO EMPNO.
LOOP AT EMPNO INTO EMP_NO.
CALL FUNCTION 'CHECK_AND_CONVERT_NUMERICS'
EXPORTING
DFELD = ' '
DMZEI = ','
DTYPE = 'STRING'
DYPNO = ' '
EFELD = EMP_NO-PERNR
FNAME = ' '
PROGR = ' '
IMP_DECIMALS = '0'
IMPORTING
ERROR =
IFELD = EMP_NO1-PERNR
MESSG = ERR
MSGLN =
IF ( ERR-MSGID = '' ).
APPEND EMP_NO1 TO EMPNO1.
CLEAR EMP_NO1-PERNR.
ELSE.
MESSAGE I455(0) WITH 'Could not convert employee number'.
LEAVE TO SCREEN 0.
ENDIF.
ENDLOOP.
ENDIF.
ENDFORM. "GET_VALUE
*& Form GET_PERNR
text
FORM GET_PERNR.
SPLIT TEMP_NUM AT ',' INTO EMP_NO TEMP_NUM.
APPEND EMP_NO TO EMPNO.
CLEAR EMP_NO.
SEARCH TEMP_NUM FOR ','.
IF SY-SUBRC = 0.
PERFORM GET_PERNR.
ENDIF.
ENDFORM. "GET_PERNR
*& Form ERROR_MSG
text
--> p1 text
<-- p2 text
FORM ERROR_MSG.
IF SY-SUBRC <> 0.
CALL FUNCTION 'FORMAT_MESSAGE'
EXPORTING
LANG = SY-LANGU
IMPORTING
MSG = MSG-MSG1.
APPEND MSG.
CLEAR MSG.
ENDIF.
ENDFORM. "ERROR_MSG
*& Form F_BDCDATA
text
FORM F_BDCDATA.
PERFORM BDC_DYNPRO USING 'SAPMP50A' '1000'.
PERFORM BDC_FIELD USING 'BDC_OKCODE'
'=INS'.
PERFORM BDC_FIELD USING 'RP50G-PERNR'
INT_0015-PERNR.
PERFORM BDC_FIELD USING 'RP50G-TIMR6'
'X'.
PERFORM BDC_FIELD USING 'BDC_CURSOR'
'RP50G-CHOIC'.
PERFORM BDC_FIELD USING 'RP50G-CHOIC'
'0015'.
PERFORM BDC_DYNPRO USING 'MP001500' '2000'.
PERFORM BDC_FIELD USING 'BDC_CURSOR'
'Q0015-BETRG'.
PERFORM BDC_FIELD USING 'BDC_OKCODE'
'/00'.
PERFORM BDC_FIELD USING 'P0015-LGART'
'0077'. "CHANGE WAGE TYPE HERE
ALSO
PERFORM BDC_FIELD USING 'Q0015-BETRG'
INT_0015-BETRG.
PERFORM BDC_FIELD USING 'P0015-WAERS'
'INR'.
PERFORM BDC_FIELD USING 'P0015-BEGDA'
INT_0015-BEGDA.
PERFORM BDC_DYNPRO USING 'MP001500' '2000'.
PERFORM BDC_FIELD USING 'BDC_CURSOR'
'P0015-LGART'.
PERFORM BDC_FIELD USING 'BDC_OKCODE'
'=UPD'.
PERFORM BDC_FIELD USING 'P0015-LGART'
'0077'. "CHANGE WAGE TYPE HERE
ALSO
PERFORM BDC_FIELD USING 'Q0015-BETRG'
INT_0015-BETRG.
PERFORM BDC_FIELD USING 'P0015-WAERS'
'INR'.
PERFORM BDC_FIELD USING 'P0015-BEGDA'
INT_0015-BEGDA.
ENDFORM. "F_BDCDATA
*& Form BDC_DYNPRO
text
-->P_0732 text
-->P_0733 text
FORM BDC_DYNPRO USING VALUE(P_0732) TYPE C
VALUE(P_0733) TYPE C.
CLEAR BDCDATA.
BDCDATA-PROGRAM = P_0732.
BDCDATA-DYNPRO = P_0733.
BDCDATA-DYNBEGIN = 'X'.
APPEND BDCDATA.
ENDFORM. " BDC_DYNPRO
*& Form BDC_FIELD
text
-->P_0755 text
-->P_0756 text
FORM BDC_FIELD USING VALUE(P_0755) TYPE C
VALUE(P_0756) TYPE C.
CLEAR BDCDATA.
BDCDATA-FNAM = P_0755.
BDCDATA-FVAL = P_0756.
APPEND BDCDATA.
ENDFORM. " BDC_FIELD
*& Form CAL_ALLOWANCE
text
FORM CAL_ALLOWANCE.
LOOP AT INT_PETROL1 INTO INT_PETROL.
IF INT_PETROL-TRFST = 'L1'.
INT_PETROL-PALLOWANCE = P_RATE * 100. "CHANGE TO SELECT WHEN
DISPLAY
ELSEIF INT_PETROL-TRFST = 'L2'.
INT_PETROL-PALLOWANCE = P_RATE * 150.
ELSEIF INT_PETROL-TRFST = 'L3'.
INT_PETROL-PALLOWANCE = P_RATE * 150.
ELSEIF INT_PETROL-TRFST = 'L4'.
INT_PETROL-PALLOWANCE = P_RATE * 200.
ELSEIF INT_PETROL-TRFST = 'L5'.
INT_PETROL-PALLOWANCE = P_RATE * 250.
ENDIF.
MODIFY INT_PETROL1 FROM INT_PETROL TRANSPORTING PALLOWANCE.
ENDLOOP.
ENDFORM. "CAL_ALLOWANCE
*& Form FILL_FIELDCAT
text
--> p1 text
<-- p2 text
FORM FILL_FIELDCAT.
INT_FIELDCAT-COL_POS = 1.
INT_FIELDCAT-TABNAME = 'INT_PETROL1'.
INT_FIELDCAT-FIELDNAME = 'PERNR'.
INT_FIELDCAT-SELTEXT_L = TEXT-005.
INT_FIELDCAT-OUTPUTLEN = 10.
INT_FIELDCAT-KEY = 'X'.
APPEND INT_FIELDCAT.
CLEAR INT_FIELDCAT.
INT_FIELDCAT-COL_POS = 2.
INT_FIELDCAT-TABNAME = 'INT_PETROL1'.
INT_FIELDCAT-FIELDNAME = 'NAME'.
INT_FIELDCAT-SELTEXT_L = TEXT-006.
INT_FIELDCAT-OUTPUTLEN = 25.
INT_FIELDCAT-KEY = 'X'.
APPEND INT_FIELDCAT.
CLEAR INT_FIELDCAT.
INT_FIELDCAT-COL_POS = 3.
INT_FIELDCAT-TABNAME = 'INT_PETROL1'.
INT_FIELDCAT-FIELDNAME = 'TRFST'.
INT_FIELDCAT-SELTEXT_L = TEXT-007.
INT_FIELDCAT-OUTPUTLEN = 5.
INT_FIELDCAT-KEY = 'X'.
APPEND INT_FIELDCAT.
CLEAR INT_FIELDCAT.
INT_FIELDCAT-COL_POS = 4.
INT_FIELDCAT-TABNAME = 'INT_PETROL1'.
INT_FIELDCAT-FIELDNAME = 'PALLOWANCE'.
INT_FIELDCAT-SELTEXT_L = TEXT-008.
INT_FIELDCAT-OUTPUTLEN = 16.
INT_FIELDCAT-KEY = 'X'.
APPEND INT_FIELDCAT.
CLEAR INT_FIELDCAT.
ENDFORM. " FILL_FIELDCAT
*& Form GET_EVENTS_ALV
text
--> p1 text
<-- p2 text
FORM GET_EVENTS_ALV.
CALL FUNCTION 'REUSE_ALV_EVENTS_GET'
EXPORTING
I_LIST_TYPE = 1
IMPORTING
ET_EVENTS = INT_EVENTS[]
EXCEPTIONS
LIST_TYPE_WRONG = 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.
READ TABLE INT_EVENTS INTO WS_EVENTS WITH KEY NAME =
SLIS_EV_TOP_OF_PAGE.
IF SY-SUBRC = 0.
WS_EVENTS-FORM = 'TOP'.
MODIFY INT_EVENTS FROM WS_EVENTS INDEX SY-TABIX.
ENDIF.
ENDFORM. " GET_EVENTS_ALV
*& Form TOP-OF-PAGE
text
FORM TOP.
*-- ALV Declarations
DATA: WS_HEADER TYPE SLIS_T_LISTHEADER,
WA_HEADER TYPE SLIS_LISTHEADER.
*-- Title
WA_HEADER-TYP = 'H'.
WA_HEADER-INFO = TEXT-009.
APPEND WA_HEADER TO WS_HEADER.
CLEAR WA_HEADER.
WA_HEADER-TYP = 'H'.
WA_HEADER-INFO = TITLE.
APPEND WA_HEADER TO WS_HEADER.
CLEAR WA_HEADER.
WA_HEADER-TYP = 'H'.
WA_HEADER-INFO = ' '.
APPEND WA_HEADER TO WS_HEADER.
CLEAR WA_HEADER.
WA_HEADER-TYP = 'H'.
WA_HEADER-INFO = ' '.
APPEND WA_HEADER TO WS_HEADER.
CLEAR WA_HEADER.
CALL FUNCTION 'REUSE_ALV_COMMENTARY_WRITE'
EXPORTING
IT_LIST_COMMENTARY = WS_HEADER
I_LOGO = 'LOGO'.
ENDFORM. "TOP-OF-PAGE
regards
karthik
Edited by: KARTIKEYA (EDS-VZG) on May 5, 2008 1:41 PM -
Automated data load from APO to SEM transactional cube
Hi ,
We have BW-SEM system integrated with APO system.
I could see automated data loads from APO to SEM transactional cube ..
Infopackage name as "Request loaded using the APO interface without monitor log" ..
I don't see any infopackage by this name in both the systems ( APO & SEM )..
I am not sure how it configured ..
Appreciate any inputs on how its happens .....
Thanks in advanceHi,
As I mentioned the starting point will be the tcode BPS0. There will be 2 planning areas created (if I am correct) one for SEM cube and the other for APO cube. The better way to find it will be goto tcode se16 and enter UPC_BW_AREA and key in the cube names in the cube field. this will give you the planning area names now look for a multiplanning area which has the 2 areas included in them (this is available in table UPC_AREAM).
then goto BPS0 and you will have to find which function is being used to post the data.
thanks -
Can we enter data in any standard table directly through custom form??
Dear All,
Can we enter data in any standard table directly through custom form??
I have create custom form in R.12. I want to insert data in quality standard table directly through custom form. Need experts guideline.
Awaiting regards,Hi,
Can we enter data in any standard table directly through custom form??
I have create custom form in R.12. I want to insert data in quality standard table directly through custom form. Need experts guideline.
Awaiting regards,
I would not recommend touching the standard tables at all unless you are being guided by the SR. For a record to be in the standard table it should go through series of validations based on the what operation you are performing and some times datas are dependent upon the other tables, and also some times the same records are hit to so many other tables simultaneously.
Therefore I would not recommend this brother.
Thanks &
Best Regards, -
While Creating New Insert Form Existing Data Display from the Table
Hi
I am New To Sun Java Studio Creator and New to Java Also While Creating New Insert Form Existing Data Display from the Table while i am Run the Form. Can any one help me to Solve this oneDear Giri,
As per your Advise, Literally I have Search the Properties for the Components to set value Null, but I am Unable to find the Value in Properties palate. I have tried in various options like
In the Properties Palate
TextField1_onselect use Value null
TextField1_text I have selected use Value option and I have manually Keyed-in null;
In the JSP Page, I have manually keyed in the null value below said
<ui:textField binding="#{BI.textField2}" id="textField2" style="position: absolute; left: 240px; top: 96px" text="#{BI.bDataProvider.value['ISSUENO'] = null}"/>
<ui:textField binding="#{BI.textField2.Value = null }" id="textField2" style="position: absolute; left: 240px; top: 96px" text="#{BI.bDataProvider.value['ISSUENO'] = null}"/>
At last I am Failure. I am ignorant of it. Can you please help me on this where I have to set null value for the components? I will be very kind of you -
Value Set whose Data come from customize table with distinct record
Dear All,
I am new in Oracle EBS, currently i am creating value set whose data come from customize table which have 40 duplicate record in which distinct column return 27 record .
Table XX_ROUND_SET
Columns (Transactions_id,set_record)
Total Record (40)
Distinct Record (Set_Record --> 27)
I just want to show only 27 record in it.
Thanks
RehanHi Rehan,
PL.IGNORE MY EARLIER UPDATE AND TREAT THIS UPDATE AS YOUR SOLUTION.
Method 1
Create the VIEW based on DISTINCT values; use the VIEW for creates the VALUESET.
Method 2
Paste the QUERY in TABLE field with alias name, and give the column name (with alias name).
(in your case )
TABLE NAME : ( select distinct transactions_id, set_record from XX_ROUND_SET ) Y
VALUE : Y.transactions_id
HTH
Sanjay -
Data extraction from shared table
Hello All,
I have a scenario where I have two different software systems (SAP and xyz systems), where a intermediate table will be created in between the two systems that is shared. Data will be updated by the xyz systems into this shared table. Now, my questions regarding this shared table.
1) Can we write some program or something to get the data from shared table to update the SAP?
2) If possible send me the suggestions
3) Please also send me the sample code to get the data from the shared table
Thanks in advance,
SDN poweredHI,
Where will this shared table resides ? In SAP system ? or any database ?
If any database, you can extract the data from there and update/insert the data into SAP table thru XI. For this you need to query the shared table with JDBC adapter and post the information...
It is easy, if you give the informations about shared system ..
Regards,
moorthy -
Data transfer from oracle database(external database) to sap database
Hi Abapers,
I have a requirment like excel data upload from oracle database(external database) to SAP database .Plz any one can help me how to create a bdc program for this requarment.
Advance thanks you.
JnanaHI
use function module 'ASLM_EXCEL_TO_INTERNAL_TABLE' TO UPLOAD DATA FROM EXCEL SHEET TO INTERNAL TABLE. FROM THERE U CAN SAVE IT TO DATABASE USING BDC FUNCTION MODULES. -
Data download from CRM from standard browser based transactions
This is, I'm afraid, rather a general question. I'm doing some R&D for a software development company (SAP Partner), and we're looking for a few use cases for where data is downloaded from CRM, specifically from browser based transactions. We're not interested in anything that downloads from ALV - we've got that covered. Our main concern is other download mechanism that might be available in standard CRM functionality.
If anyone can point to some use cases, involving data download from a browser front end (web dynpro, presumably), that would be very useful.Hello Matthieu,
As far as CRM7.0 is concerned (which is bsp-based) here are a few applications where users can download information from sap to local pc:
- Take any result list table and hit the "download to excel button".
- Start the "data import tool" that is available in UTIL_SALES business role, you'll be able to download an Excel file as well
- Click any link to attached documents to a business object (sales order transaction for example)
- Etc.
If you need help to start one of those application just let me know.
Regards
Nicolas. -
Data retrival from standard transaction
hi all,
i have to get the material list from stadard t-code ca80 i have debugged the program and the whole material list is in tmapl internal table so if any one can find me a solution thats ll be very helpful. and points are rewarded
thanks in advance
anupamahi,
You can call transaction and send the data to it.
call transaction mm01 and skip first screen.
set parameter ID 'MAT' FIELD P_matnr.
Here you are passin gthe selection screen parameters to the standard transaction MM01 and skip the screen..
you start recording like in BDC and execute it here.
so you will be having the data in the internal table that you can update in the Database table.
Regards,
Madhavi -
Data fetch from table without Refresh and without using tab key.
hi Friends,
I have a problem i want to extract data from table without Refresh into text field without using Tab key. when i'll enter any value in a text field then corressponding value should come in to corressponding textfield without using Tab Key.
eg. when i enter emp_id 101 in a text field then the first_name and last_name ,adress should come in to corressponding text fields without refresh and without using Tab key.
How Can I do this.
Thanks
ManojHi Manoj,
I assume that this is similar to: Data fetch without Refresh rather than Re: Value of one textfield should come into another textfield Without Using TAB ?
If so, the only change you need to make on the first one is to use "onkeyup" instead of "onchange" in the item's "HTML Form Element Attributes" setting.
Note, however, that the user must move away from the item at some point (for example, to click a button), so the onchange will be triggered anyway.
Andy
Maybe you are looking for
-
I created a master fla and swf files to load into the master file externally. Everything loads into the master file just fine when I view it in flash or flash player. However I need to add a background to it along with a couple other things that I on
-
If i want to import a xml file,is the encoding must be "utf-8"???
-
How do you place an image on the shortcut of an air package? This image is for the executable shortcut link like an ICO file for a dot.net application. Thanks in advance...
-
What is the scoop on using scenes for personal demo reels from Hollywood movies? Can I put it up on my site, or is that illegal? I'd want to use a clip from LOTR or soemthing similiar. Thanks! J
-
Is fw2.2 very buggy or i´m wrong?
Hello after reading many posts, it´s my feeling that the fw2.2 is very buggy. I´m still with 2.1 and so far so good. But i never read many errors about the 2.1 that i read about the fw2.2 Nuno