Creating abap program to develop and activate a global table type and global structure.
Hi friends,
I want to create and activate a global structure and global table type by coding in ABAP editor only. so can I do that anyhow.
Please help me.
Thanks in advance.
Thanks guys for your fruitful replies, as most of you asked the main purpose of my question, the answer is as follows:
in fact my purpose to do so is to create a function module that can fetch data dynamically from different database tables based on the codings in different abap program.
for example: in one abap program i am coding as follows:
tables: kna1.
types: begin of itab,
kunnr type kna1-kunnr,
name1 type kna1-name1,
end of itab.
data: it_tab type standard table of itab,
wa_tab type itab.
similarly in other program i am coding as follows:
tables: vbrp.
types: begin of itab,
posnr type vbrp-posnr,
matnr type vbrp-matnr,
arktx type vbrp-arktx,
end of itab.
data: it_tab type standard table of itab,
wa_tab type itab.
so now for both programs i want to call the same function module and fetch data as required in relative programs as mentioned above. in that case how to create that function module?
Similar Messages
-
Only the suthor of ABAP programs can see and edit his/her code
Hi:
We've created developer accounts with the following authorization profiles: A_ABAP_ALL, S_A.DEVLOPER, AND S_A.USER.
The account holder can access the system, create ABAP programs, and successfully run them. However, there is a problem: a user can see and edit the programs of others.
Can we set up the account in such a way that only the author of the program can see and edit it? If YES, what should we do?
Thanks a lot for the help,
Thuan NguyenHi Gus:
Thanks a lot for the help. For creating profiles, I read into 2 different books to get the steps that show how to do it. however, both of them only discuss the general things and do not get to the steps of how to do it.
Do you know what I need to do to create profiles or where I can get some documentation with details of how to do it?
Thanks a lot -
i do not know why our ECC6.0 can't create abap program.we have had developer key.After i input obligatory fields,such as title,type,status and development class(package):$TMP, then I push save button.At last,it tells me Maximum Runtime Exceeded!
Thanks.Hi,
Please consult your basis guys and see if the roles are assigned correctly and also related to the issue.
Regards,
Nagaraj -
How can i get access code to create ABAP Program ?
hi guys ,
How can i get access code for creating ABAP Program in my System.
I am using SAP IDES 4.6 Version
Please Help me out .
Regards
RaghuHi Raghu,
- license your system (http://service.sap.com/licensekey)
- create a developer key (http://service.sap.com/sscr)
- create a key for your ABAP program (httP://service.sap.com/sscr)
Markus -
ABAP program for BAPI and convert DB into XML
ABAP program for BAPI and convert DB into XML
Thank you,
Regards,
Jagrut BharatKumar ShuklaRefer the link -
give an example of bapi coding?
how can we transfer huge amount of data from database server to xml format
Regards,
Amit
Reward all helpful replies. -
Runtime error:ABAP program lines are longer than the internal table
Hi all,
Below is the code I have written,when Iam running it Iam getting
'ABAP program lines are longer than the internal table' runtime error.How can I resolve it.
REPORT ZTEST1 NO STANDARD PAGE HEADING LINE-SIZE 255.
TABLES:MARC,CDHDR,CDPOS.
TYPE-POOLS:SLIS.
DATA:HEADER TYPE SLIS_T_FIELDCAT_ALV,
WA TYPE SLIS_FIELDCAT_ALV,
LAYOUT TYPE SLIS_LAYOUT_ALV.
TYPES:BEGIN OF MARC_TY,
MATNR LIKE MARC-MATNR,
WERKS LIKE MARC-WERKS,
EKGRP LIKE MARC-EKGRP,
MINBE LIKE MARC-MINBE,
EISBE LIKE MARC-EISBE,
MABST LIKE MARC-MABST,
END OF MARC_TY.
TYPES:BEGIN OF MATNR1_TY,
MATNR1 LIKE CDHDR-OBJECTID,
END OF MATNR1_TY.
TYPES:BEGIN OF CDHDR_TY,
OBJECTCLAS LIKE CDHDR-OBJECTCLAS,
OBJECTID LIKE CDHDR-OBJECTID,
CHANGENR LIKE CDHDR-CHANGENR,
USERNAME LIKE CDHDR-USERNAME,
UDATE LIKE CDHDR-UDATE,
END OF CDHDR_TY.
TYPES:BEGIN OF CDPOS_TY,
OBJECTCLAS LIKE CDPOS-OBJECTCLAS,
OBJECTID LIKE CDPOS-OBJECTID,
CHANGENR LIKE CDPOS-CHANGENR,
TABNAME LIKE CDPOS-TABNAME,
FNAME LIKE CDPOS-FNAME,
CHNGIND LIKE CDPOS-CHNGIND,
VALUE_NEW LIKE CDPOS-VALUE_NEW,
VALUE_OLD LIKE CDPOS-VALUE_OLD,
END OF CDPOS_TY.
**************TABLE TYPES********************************************
TYPES: MARC_TAB TYPE TABLE OF MARC_TY,
MATNR1_TAB TYPE TABLE OF MATNR1_TY,
CDHDR_TAB TYPE TABLE OF CDHDR_TY,
CDPOS_TAB TYPE TABLE OF CDPOS_TY.
*******************INTERNAL TABLES************************************
DATA:MARC_ITAB TYPE MARC_TAB,
MATNR1_ITAB TYPE MATNR1_TAB,
CDHDR_ITAB TYPE CDHDR_TAB,
CDPOS_ITAB TYPE CDPOS_TAB.
****************WORK AREAS********************************************
DATA:MARC_WA TYPE MARC_TY,
MATNR1_WA TYPE MATNR1_TY,
CDHDR_WA TYPE CDHDR_TY,
CDPOS_WA TYPE CDPOS_TY.
*******************SELECTION-SCREEN***********************************
SELECTION-SCREEN BEGIN OF BLOCK B1 WITH FRAME TITLE TEXT-000.
PARAMETERS:PLANT LIKE MARC-WERKS.
SELECT-OPTIONS:MATERIAL FOR MARC-MATNR.
SELECT-OPTIONS:DATE FOR CDHDR-UDATE.
SELECTION-SCREEN END OF BLOCK B1.
START-OF-SELECTION.
SELECT MATNR
WERKS
EKGRP
MINBE
EISBE
MABST
FROM MARC INTO TABLE MARC_ITAB
WHERE MATNR IN MATERIAL
AND WERKS = PLANT.
CHECK MARC_ITAB[] IS NOT INITIAL.
LOOP AT MARC_ITAB INTO MARC_WA.
MATNR1_WA-MATNR1 = MARC_WA-MATNR.
APPEND MATNR1_WA TO MATNR1_ITAB.
CLEAR MATNR1_WA.
ENDLOOP.
CHECK MATNR1_ITAB[] IS NOT INITIAL.
SELECT OBJECTCLAS
OBJECTID
CHANGENR
USERNAME
UDATE
FROM CDHDR INTO TABLE CDHDR_ITAB
FOR ALL ENTRIES IN MATNR1_ITAB
WHERE OBJECTCLAS = 'MATERIAL'
AND OBJECTID = MATNR1_ITAB-MATNR1
AND UDATE IN DATE.
CHECK CDHDR_ITAB[] IS NOT INITIAL.
SORT CDHDR_ITAB[] DESCENDING BY OBJECTID CHANGENR.
DELETE ADJACENT DUPLICATES FROM CDHDR_ITAB[] COMPARING OBJECTID.
SELECT OBJECTCLAS
OBJECTID
CHANGENR
TABNAME
FNAME
CHNGIND
VALUE_NEW
VALUE_OLD
FROM CDPOS INTO CORRESPONDING FIELDS OF TABLE CDPOS_ITAB
FOR ALL ENTRIES IN CDHDR_ITAB
WHERE OBJECTCLAS = CDHDR_ITAB-OBJECTCLAS
AND OBJECTID = CDHDR_ITAB-OBJECTID
AND CHANGENR = CDHDR_ITAB-CHANGENR
AND TABNAME = 'MARC'
AND FNAME IN ('MINBE','EISBE','MABST','LVORM')
AND CHNGIND = 'U'.
CHECK CDPOS_ITAB[] IS NOT INITIAL.
*LOOP AT CDPOS_ITAB INTO CDPOS_WA.
WRITE: / CDPOS_WA-OBJECTCLAS,
CDPOS_WA-OBJECTID,
CDPOS_WA-CHANGENR,
CDPOS_WA-TABNAME,
CDPOS_WA-FNAME,
CDPOS_WA-CHNGIND,
CDPOS_WA-VALUE_NEW,
CDPOS_WA-VALUE_OLD.
*ENDLOOP.
WA-SELTEXT_L = 'OBJECTCLAS'.
WA-COL_POS = '1'.
WA-FIELDNAME = 'OBJECTCLAS'.
WA-TABNAME = 'CDPOS_ITAB'.
WA-OUTPUTLEN = '15'.
APPEND WA TO HEADER.
CLEAR WA.
WA-SELTEXT_L = 'OBJECTID'.
WA-COL_POS = '2'.
WA-FIELDNAME = 'OBJECTID'.
WA-TABNAME = 'CDPOS_ITAB'.
WA-OUTPUTLEN = '20'.
APPEND WA TO HEADER.
CLEAR WA.
WA-SELTEXT_L = 'CHANGENR'.
WA-COL_POS = '3'.
WA-FIELDNAME = 'CHANGENR'.
WA-TABNAME = 'CDPOS_ITAB'.
WA-OUTPUTLEN = '8'.
APPEND WA TO HEADER.
CLEAR WA.
WA-SELTEXT_L = 'TABNAME'.
WA-COL_POS = '4'.
WA-FIELDNAME = 'TABNAME'.
WA-TABNAME = 'CDPOS_ITAB'.
WA-OUTPUTLEN = '5'.
APPEND WA TO HEADER.
CLEAR WA.
WA-SELTEXT_L = 'FNAME'.
WA-COL_POS = '5'.
WA-FIELDNAME = 'FNAME'.
WA-TABNAME = 'CDPOS_ITAB'.
WA-OUTPUTLEN = '7'.
APPEND WA TO HEADER.
CLEAR WA.
WA-SELTEXT_L = 'CHANGING'.
WA-COL_POS = '6'.
WA-FIELDNAME = 'CHANGING'.
WA-TABNAME = 'CDPOS_ITAB'.
WA-OUTPUTLEN = '1'.
APPEND WA TO HEADER.
CLEAR WA.
WA-SELTEXT_L = 'VALUE_NEW'.
WA-COL_POS = '7'.
WA-FIELDNAME = 'VALUE_NEW'.
WA-TABNAME = 'CDPOS_ITAB'.
WA-OUTPUTLEN = '5'.
APPEND WA TO HEADER.
CLEAR WA.
WA-SELTEXT_L = 'VALUE_OLD'.
WA-COL_POS = '8'.
WA-FIELDNAME = 'VALUE_OLD'.
WA-TABNAME = 'CDPOS_ITAB'.
WA-OUTPUTLEN = '5'.
APPEND WA TO HEADER.
CLEAR WA.
CALL FUNCTION 'REUSE_ALV_FIELDCATALOG_MERGE'
EXPORTING
I_PROGRAM_NAME = SY-REPID
I_INTERNAL_TABNAME = 'CDPOS_ITAB'
I_CLIENT_NEVER_DISPLAY = 'X'
I_INCLNAME = SY-REPID
CHANGING
CT_FIELDCAT = HEADER[]
EXCEPTIONS
IF SY-SUBRC <> 0.
ENDIF.
CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
EXPORTING
I_CALLBACK_PROGRAM = SY-REPID
IT_FIELDCAT = HEADER[]
TABLES
T_OUTTAB = CDPOS_ITAB[]
IF SY-SUBRC <> 0.
ENDIF.Your select querry on MARC is not matching with MARC_TY.
The field in the MARC table and MARC_TY should be same.
and also, when you are making select querry on CDPOS table
with all entries.
When ever you are using all entries select statement, you should check whether the internal table is having value.
you should check
if CDPOS_IT[] is not initial.
SELECT OBJECTCLAS
OBJECTID
CHANGENR
TABNAME
FNAME
CHNGIND
VALUE_NEW
VALUE_OLD
FROM CDPOS INTO CORRESPONDING FIELDS OF TABLE CDPOS_ITAB
FOR ALL ENTRIES IN CDHDR_ITAB
WHERE OBJECTCLAS = CDHDR_ITAB-OBJECTCLAS
AND OBJECTID = CDHDR_ITAB-OBJECTID
AND CHANGENR = CDHDR_ITAB-CHANGENR
AND TABNAME = 'MARC'
AND FNAME IN ('MINBE','EISBE','MABST','LVORM')
AND CHNGIND = 'U'.
endif.
Regards
Madhan D -
How to transport a ABAP program to Test and Production?
I created a ABAP program and used in a Process chain. I did transport to Testing system. I got an error message that program didn't not find when I was trying to run that Process Chain.
How can collect the Program and transport it again? Thanks!steps required.
1) find the name of the program
2) collect it in the transport request.
1)go to the process chains maintaincne and right click on the abap process > to the maintaince screen and note down the name of the program
2) go to se37 type in the program name > display > menu > goto > object directory entry.
3) go to se10 > request and check the attributes of the object >
r3tr-fugr- ( package name ) > select the request and release it.
Regards,
BWer -
Execute ABAP program on R3 and export data to BI
Hi All,
I would like to know if there are steps to execute the remote program on R3 side and return the data to BI? I read a few
articles in there but couldn't figure how to do that yet. Could some one point me to the source/documents that I can read about?
Thanks in advance,
TaiIf you have an ABAP program on BW, you can call the Function Module on ECC through RFC and it will retireve the data. Depending on data volume and how sophisticated you want to get, you can even packetize the extraction so as to not put a huge strain on your ECC and BW resources.
This is typically the technology behind how standard content and generic R3/ECC DataSources extract data from an R3/ECC system and into a BW system.
For modeling purposes, if the data you want to extract is on a table in R3/ECC, you'd be better off creating a generic DataSource, if a standard content DataSource doesn't already exist. RFC enabled Function Modules are good for reading flat files on a R3/ECC server to load into BW. -
ABAP Programs Performance Tuning and Web Services
Hi,
Can anyone give me any good material link or eBook on SAP ABAP programs Performance Tuning. What are the things that needs to be done for performance tuning etc..
Also, any material or simple eBook on web services.
my email is [email protected]
Thanks a ton in advance.
Swetha.Check this link ABAP Development Performance Tuning
https://www.sdn.sap.com/irj/sdn/wiki?path=/display/abap/performance%2btuning
Check these threads.
How do you take care of performance issues in your ABAP programs?
http://help.sap.com/saphelp_nw04/helpdata/en/9f/db9bd335c111d1829f0000e829fbfe/frameset.htm -
Regarding ABAP program to read and manipulate data from Excel file....
Hi,
I want to write a ABAP program which will read Excel file which has three columns viz: Col A, Col B and Col C.
If there is no data in Col B and Col C for a given record in Column A, then progam should print all those records on screen with write statement.
Regards,
Rajesh.Hi
Check
PARAMETERS: filename LIKE rlgrap-filename MEMORY ID M01,
begcol TYPE i DEFAULT 1 NO-DISPLAY,
begrow TYPE i DEFAULT 1 NO-DISPLAY,
endcol TYPE i DEFAULT 100 NO-DISPLAY,
endrow TYPE i DEFAULT 32000 NO-DISPLAY.
CALL FUNCTION 'ALSM_EXCEL_TO_INTERNAL_TABLE'
EXPORTING
filename = filename
i_begin_col = begcol
i_begin_row = begrow
i_end_col = endcol
i_end_row = endrow
TABLES
intern = intern
EXCEPTIONS
inconsistent_parameters = 1
upload_ole = 2
OTHERS = 3.
After getting Records in INTERN TABLE You can loop it to check where columns B & C are empty and store them in another table .
LOOP AT intern.
IF INTERN B and C has value .
CONTINUE
ELSE .
MOVE THEM INTO ANOTHER TABLE ITAB .
ENDIF .
ENDLOOP.
THEN LOOP ITAB .
WRITE : ' '
ENDLOP .
Hope this Helps .
Praveen -
New ABAP Program to check Direct UPDATE in Database Table
Hi all,
As per customer requirement , I have to develop ONE Program which find out that in which ABAP Program , Programmer has used Open Sql command like UPDATE , DELETE , INSERT , MODIFY to direct update in Database Table.
Have a look on all Z-ABAPs, find out if there are statements with "update", "delete", "insert" or "modify" in the coding, then find out if updates to sap-Tables are done
How can I achived that ?
Please , If anybody is having idea , than please let me know..
Thanks You ,Hi
Kindly refer to the below link. This has step by step how you can achieve the checks.
[http://www.sdn.sap.com/irj/scn/index?rid=/library/uuid/12659a90-0201-0010-c18b-9d014f9bed0d]
But if you want to check if any program they have used 'UPDATE' then you can do like below.
Go to SE38
Utilities---> Find in Source Code-
Find --- UPDATE
In program - Z* or ZX* if you want to search only in Exits
Regards,
Vijay V . -
ABAP program using infotypes and FM
Hi all,
I have to work on abap -HR module, which is using infotypes, BDC, FM, internal tables.. As I am new in this and no more idea. So can you please share some document and some simple program, so that I can understand the HR modules with respective to ABAP and can work.
Your help will be appreciated.
Thankshi ram,
check these links...
http://www.sap-basis-abap.com/saphr.htm
http://www.sap-basis-abap.com/books.htm
http://www.sapbrain.com/TUTORIALS/FUNCTIONAL/HR_tutorial.html
http://www.sapdevelopment.co.uk/hr/hrhome.htm
http://planetsap.com/index.htm
http://www.atomhr.com/library_full.htm
http://www.sap-basis-abap.com/saphr.htm
http://help.sap.com/saphelp_erp2005/helpdata/en/60/d8d8c7576311d189270000e8322f96/frameset.htm
http://www.sapfriends.com/sapstuff.html
http://www.sap-basis-abap.com/saphr.htm
http://searchsap.techtarget.com/originalContent/0,289142,sid21_gci1030179,00.html?track=NL-142&ad=500911#Transactions
http://help.sap.com/saphelp_47x200/helpdata/en/4f/d5275f575e11d189270000e8322f96/content.htm
http://help.sap.com/saphelp_47x200/helpdata/en/4f/d5275f575e11d189270000e8322f96/content.htm
http://www.saptips.com/Previews/SAPtipsAugust-September2004TableOfContents.pdf
http://searchsap.techtarget.com/originalContent/0,289142,sid21_gci1030179,00.html?track=NL-142&ad=500911#Transactions
http://help.sap.com/saphelp_46c/helpdata/en/4f/d528be575e11d189270000e8322f96/frameset.htm.
http://www.sap-basis-abap.com/saphr.htm.
http://www.sapgenie.com/faq/hr.htm
http://www.sapgenie.com/workflow/scenarios.htm
http://www.sap-img.com/human/hr-faq.htm
http://www.sapdevelopment.co.uk/hr/hrhome.htm
http://www.sapgenie.com/mysap/mysap_hr.htm
Re: remunaration statement -
Can we create the Mapping program,when source and target structures same?
Hi Friends,
if we have the same structure at source side and target side:
1) Is it necessary to create the mapping program?
2) If no need of mapping program what you will mention in the Interface Mapping?
3) In ID part which objects no need to create when both structures are same?
Regards,
Naidu.Hi
>1) Is it necessary to create the mapping program?
No need to create mapping if both structure identical in all respects.
>2) If no need of mapping program what you will >mention in the Interface Mapping?
Dont define mapping and iterface mapping.
>3) In ID part which objects no need to create when >both structures are same?
You cannt assign a interface mapping as it is not defined in IR. leave that as interface mapping is not mandatory in Interface Determination Step.
Thanks
Gujjeti -
Need ABAP program logic to fetch datas from four tables
Hi Friends,
I have to develop a print program for purchase requisition.
when a program is executed it has to accept the PR number,and it has to display the purchase requisition informations,also it has to display the address of the plant in the header.
I have to fetch datas from EBAN,T001W,ADR2,ADR3 and ADR6.so i need all your help in writing the best select query for this program to work efficiently.
Thanks in advance.Please don't just unload your specification here and expect others to do your work.
Thread locked.
Thomas
P.S. "Total questions: 231 (191 unresolved)" is a lousy track record, please close your open questions properly, leaving a final comment only when it adds value. -
The ABAP program lines are wider than the internal table.
Hello;
i use FM REUSE_ALV_FIELDCATALOG_MERGE to fill in fieldcat from an internal table but i receive dump message READ_REPORT_LINE_TOO_LONG. Is there smt. like a type mismatch or waht can that be?
detail explanation of the dump is
The internal table "\FUNCTION=K_KKB_FIELDCAT_MERGE\DATA=L_ABAP_SOURCE[]" is 72 characters wide. The program line is
81 characters wide.
source of the call is like:
DATA: ALV_FIELDCAT TYPE SLIS_T_FIELDCAT_ALV WITH HEADER LINE,
ALV_HEADER TYPE SLIS_T_LISTHEADER WITH HEADER LINE,
ALV_EVENTS TYPE SLIS_T_EVENT WITH HEADER LINE,
ALV_LAYOUT TYPE SLIS_LAYOUT_ALV,
ALV_PRINT TYPE SLIS_PRINT_ALV,
ALV_REPID LIKE SY-REPID, " program name
CALL FUNCTION 'REUSE_ALV_FIELDCATALOG_MERGE'
EXPORTING
I_PROGRAM_NAME = alv_repid
I_INTERNAL_TABNAME = 'ITAB'
I_INCLNAME = alv_repid
CHANGING
CT_FIELDCAT = alv_fieldcat[]
EXCEPTIONS
OTHERS = 3.
thx in advance
AliHi,
At least one line of the source text is longer than the lines of the internal table itab then,
READ_REPORT_LINE_TOO_LONG. error occurs.
Cause: At least one line of the source text is longer than the lines of the internal table itab.
Runtime Error: READ_REPORT_LINE_TOO_LONG
check the link below for further info
http://www.s001.org/ABAP-Hlp/abapread_report.htm
one more thing, whether u have given report name
ALV_REPID = 'ZXYZ'.
if ZXYZ is u r program name
Maybe you are looking for
-
V1.9 Channel Guide - Questions & Concerns
In speaking with customer support this morning, it would appear that my only recourse for letting Verizon know that I don’t like the new Channel Guide is to make a post on the forums and this looks more appropriate that the tech forums after looking
-
My iMac is hung @ startup.
I'm on Mavericks, late 2009 21" iMac. Response time has been sLOW lately so I rebooted it's been 10+ mins with twirling ball. What do I need to do?
-
How to change the reserved quanities?
Hi, I have to change the valuation class for the materials in a particular plant. But some matetials have unrestricted as well as reserved quanitities. For the materials which have Unrestricted quantity, I have done transfer posting in MB1B with
-
Hi, I have job history setting like this: I would like to see keep backup history for long time (this job setup last year). But I can only see job history earliest at 04/17 this year. Does anyone have idea what happen to this job history? What proce
-
Hi ich hab ae 5.5 und hab jetz mal einen kurzen clip gemacht 7 sek und will den gerne rendern aber wenn ich ihn render und dann in den speicherort kucke ist er auch da aber hat ne länge von 00.00. sekunden Kp was ich falsch mache ??