Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

diplay data in function module

Former Member
0 Likes
335

Hi

I am extracting data for PLANT MAINTAINENCE application, it is in master data. Data contains in 8 tables .and display 12 fields in the report and i have to extract data in BW side.

So i am using function module to extract the data from R/3 to

BW side, I am not using appropriate function module.

Here how to link all the tables. Here we are using EQUNR key,based on this one we are diplaying the data.

Filed names Table names

EQUNR-euipment no. J_3GSTLKOPF

LTEXT-Catalog text /SAPCEM/KATTEXT

ATWRT-Capacity AUSP

ATINN-Inetnal carecter no AUSP

ANSDT-Purchase order date EQUI

ANSWT-Purchase cost EQUI

EQPCATLIFE-life in years J_3GSTLKOPF

CDIFF-Working hours IMRG

NAME1-Name KNA1

J_3GEINEND -Date of relaese J_3GBELP

J_3GPACHT -Leased EQUZ

If display the LTEXT filed we want use two tables. in /SAPCEM/KATTEXT table take KATNR and if u want KATNR take EQUNR in J_3GSTLKOPF table.

If display CDIFF field's here condition is consider only measuring documents(MDOCM). and we want deletion records also. How should i specify this one.

Please tell me the code.

Thanks

1 REPLY 1
Read only

former_member756887
Participant
0 Likes
300

go to se37 & give d fm name VC_I_GET_CONFIGURATION_IBASE

display

note: from EQUI table take 'CUOBJ' value EX '9825'

DISPLAY THE FM GIVE UR CUOBJ NO IN INSTANCE value textbox

in the end including zero 9825 press execute u can see in the bottom table

CONFIGURATION RESULT 53entries or whatever double click on that

unow u can see the all field name .

I HAVE DONE LIKE THIS IN SAMRT FORMS FOR PS

FOR that i written this code

&*****************************************************************

*& FOR POLE , KW , CONST FIELDS

&*****************************************************************

*break : abapdev.

SELECT SINGLE * FROM vbap INTO wa_vbap

WHERE vbeln = wa_vbrp-aubel AND posnr = wa_vbrp-posnr .

IF sy-subrc = 0.

CALL FUNCTION 'VC_I_GET_CONFIGURATION_IBASE'

EXPORTING

instance = wa_vbap-cuobj

  • BUSINESS_OBJECT =

language = sy-langu

  • IV_INVALID_POSSIBLE = ' '

  • IV_NEUTRAL = ' '

TABLES

configuration = gt_data

  • ET_CONF_WITH_AUTHOR =

EXCEPTIONS

instance_not_found = 1

OTHERS = 2.

ENDIF. .

IF sy-subrc <> 0.

  • MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO

  • WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.

ENDIF.

&***************************************************************

*& FOR POLARITY FRAMESIZE & KW

&****************************************************************

LOOP AT gt_data INTO wa_data.

IF wa_data-atnam = 'KW1'.

lv_kw1 = wa_data-atwrt.

ENDIF.

if wa_data-atnam = 'KW2'.

lv_kw2 = wa_data-atwrt.

ENDIF.

IF wa_data-atnam = 'POLARITY'.

lv_polarity = wa_data-atwrt.

ENDIF.

IF wa_data-atnam = 'FRAMESIZE'.

lv_framesize = wa_data-atwrt.

ENDIF.

ENDLOOP.

&*****************************************************************

*& FOR MACHINE NUMBER

&*****************************************************************

*break : abapdev.

SELECT SINGLE * FROM ser01 INTO wa_ser01

WHERE lief_nr = wa_likp-vbeln.

IF sy-subrc = 0.

SELECT SINGLE * FROM objk INTO wa_objk

WHERE obknr = wa_ser01-obknr.

ENDIF.

regrads

aniruddh singh