11-24-2009 10:19 AM
Hi,
I am working on a program which will create an input file for RFBIBL00.This is part of code available in old program.But as per our coding standard we are not used to have tables in our program but here it using database structure bbkf,bbseg in program.So how can i handle it.
FORM init_bgr00 USING bgr00.
bgr00 = gwa__bgr00.
ENDFORM. "init_bgr00
*---------------------------------------------------------------------*
* SUBROUTINE INIT_BBKPF *
*---------------------------------------------------------------------*
FORM init_bbkpf USING bbkpf.
bbkpf = gwa_bbkpf.
ENDFORM. "init_bbkpf
*---------------------------------------------------------------------*
* SUBROUTINE INIT_BBSEG *
*---------------------------------------------------------------------*
FORM init_bbseg USING bbseg.
bbseg = gwa_bbseg.
ENDFORM. "init_bbseg
Regards
11-24-2009 10:24 AM
Hello,
I completely understand if your coding policies says not to use database manipulations on standard SAP tables, that's normal.
However in your code example I only see that the structure from the tables are used (header), I don't see an insert, delete or update statement.
So in fact there is no database change, you only use the structures.
I don't see the problem.
Wim
11-24-2009 10:24 AM
Hello,
I completely understand if your coding policies says not to use database manipulations on standard SAP tables, that's normal.
However in your code example I only see that the structure from the tables are used (header), I don't see an insert, delete or update statement.
So in fact there is no database change, you only use the structures.
I don't see the problem.
Wim
11-24-2009 10:56 AM
Hi,
The problem is that for using these standard structures in program BBSEG,BBKPF in my program , i need to declare them using tables keyword.How i can avoid it or any other solution.
Regards
11-24-2009 4:20 PM
No, you don't. TABLES is just a short-form for a work area definition. DATA works as well. As for your standards, I fail to see the reason other than the statement can't be used in OOP. It used to be that we didn't allow TABLES because many developers didn't understand the statement and would place a declaration for every DB table used in the program without ever using the work area declared.
11-25-2009 12:05 PM
Hi,
My question is it mandatory for using the structure as workarea for creating input file for RFBIBLOO.
In the code they have this statement.here gwa_bbseg has same structure as bbseg then why they had to assign the structure gwa_bbseg to bbseg .
bbseg = gwa_bbseg.
Rgds
11-25-2009 1:55 PM
No, it makes no difference what the name of the defined structure is in the program, only that the type is correct for the record that is written to the file.