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

internal table

Former Member
0 Likes
1,715

Hi experts,

i'm try to executed this below simple selection screen report but it will show the error msg like "," expected after "ITAB".

pls anyone can help me.

thanks in advance,

muthu

REPORT Z_DMS_DOC_EXPORT.

*TABLE DECLARATION.

TABLES: DRAW.

*DATA DECLARATION

DATA: DOKAR(3) TYPE C. " DOKOR field for DRAW table.

*INTERNAL TABLE DECLARATION

DATA:BEGIN OF ITAB OCCOUR 0,

DOCUMENT TYPE LIKE DRAW-DOKAR,

END OF ITAB.

DATA I_TAB TYPE DRAW.

SELECT-OPTIONS: DOCUMENT TYPE FOR ITAB-DOCUMENT TYPE.

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
1,612

Hi Rai,

try this:

TABLES: DRAW.

*

SELECT-OPTIONS: S_DOKST FOR DRAW-DOKST.

SELECT-OPTIONS: S_ADATUM FOR DRAW-ADATUM.

PARAMETERS: P_TODAY AS CHECKBOX.

*

DATA: BEGIN OF IDRAW OCCURS 0,

DOKAR LIKE DRAW-DOKAR,

DOKNR LIKE DRAW-DOKNR,

DOKVR LIKE DRAW-DOKVR,

DOKTL LIKE DRAW-DOKTL,

END OF IDRAW.

*

START-OF-SELECTION.

*

IF P_TODAY = 'X'.

CLEAR: S_ADATUM.

REFRESH: S_ADATUM.

S_ADATUM-SIGN = 'I'.

S_ADATUM-OPTION = 'EQ'.

S_ADATUM-LOW = SY-DATUM.

APPEND S_ADATUM.

ENDIF.

SELECT * FROM DRAW WHERE DOKST IN S_DOKST

AND ADATUM IN S_ADATUM.

*

MOVE-CORRESPONDING DRAW TO IDRAW.

APPEND IDRAW.

*

ENDSELECT.

END-OF-SELECTION.

Regards Dieter

17 REPLIES 17
Read only

former_member189629
Active Contributor
0 Likes
1,612

check the spelling of "occurs". you gave OCCOUR.

secondly do not use spaces for itab fields: ie. ducument type should be document_type.

Like reference will do.

Message was edited by: Karthik Potharaju

Read only

Former Member
0 Likes
1,612

Hi

DATA:BEGIN OF ITAB OCCOUR 0,

<b>DOCUMENT TYPE LIKE DRAW-DOKAR,</b>

END OF ITAB.

it should be

DATA:BEGIN OF ITAB OCCURS 0,

<b>Document type DRAW-DOKAR,</b>

END OF ITAB.

no need to use both type and like....

u can use any one of them....

If it is DOCUMENTTYPE then don't use space....

Reward if helful by clicking radio buttons on left.

Sachin

Message was edited by: Sachin Dhingra

Read only

anversha_s
Active Contributor
0 Likes
1,612

hi,

chk this spelling of occurs.

see the correct code below.

REPORT Z_DMS_DOC_EXPORT.

*TABLE DECLARATION.

TABLES: DRAW.

*DATA DECLARATION

DATA: DOKAR(3) TYPE C. " DOKOR field for DRAW table.

*INTERNAL TABLE DECLARATION

DATA:BEGIN OF ITAB <b>OCCURS 0,</b>

DOCUMENT LIKE DRAW-DOKAR,

END OF ITAB.

DATA I_TAB TYPE DRAW.

SELECT-OPTIONS: DOCUMENT TYPE FOR ITAB-DOCUMENT TYPE.

rgds

anver

Read only

Former Member
0 Likes
1,612

Hi,

Now check it

REPORT Z_DMS_DOC_EXPORT.
*TABLE DECLARATION.
TABLES: DRAW.
*DATA DECLARATION
DATA: DOKAR(3) TYPE C. " DOKOR field for DRAW table.

*INTERNAL TABLE DECLARATION
DATA:BEGIN OF ITAB OCCURs 0,  "spelling error
DOCUMENTTYPE LIKE DRAW-DOKAR, "no gap between document and type
END OF ITAB.

DATA I_TAB TYPE DRAW.

SELECT-OPTIONS: DOCUTYP FOR ITAB-DOCUMENTTYPE. "here also

Regards

vijay

Read only

Former Member
0 Likes
1,612

REPORT Z_DMS_DOC_EXPORT.

*TABLE DECLARATION.

TABLES: DRAW.

*DATA DECLARATION

DATA: DOKAR(3) TYPE C. " DOKOR field for DRAW table.

*INTERNAL TABLE DECLARATION

DATA:BEGIN OF ITAB OCCURs 0,

DOCUMENT LIKE DRAW-DOKAR,

END OF ITAB.

DATA I_TAB TYPE DRAW.

SELECT-OPTIONS: DOCU_TY FOR DRAW-DOKAR.

Read only

Former Member
0 Likes
1,612

Hi raj,

DATA:BEGIN OF ITAB OCCOUR 0,

<b>DOCUMENT TYPE LIKE DRAW-DOKAR,</b>

END OF ITAB.

i think TYPE LIKE isn't correct.

use type OR line not both.

Regards, Dieter

Read only

Former Member
0 Likes
1,612

Hi Experts,

now i got executed the report.

but when i execute the report ,i want to display the short text(Document Type) in screen.

DRAW is the standard table

DOKAR is standard field.

DRAW-DOKAR -> short text is Document Type.

for that how i declare internal table, how to defined that in select-option and data type.

Thanks,

muthu

Read only

0 Likes
1,612

Hi Raj,

tables: draw.
select-options: s_dokar for draw-dokar.

you can maintain the text for your select option from menu Go to ->Text elements -> Selection Texts

and now maintain the text as <b>Document Type</b> for your select option.

Regards

vijay

Read only

0 Likes
1,612

Hi,

TABLES: draw.

SELECT-OPTIONS: s_dokar FOR draw-dokar.

For Your Text

Go to ->Text elements -> Selection Texts

rgds

anver

Read only

Former Member
0 Likes
1,612

Hi Raj,

try this:

SELECT-OPTIONS: S_DOKAR FOR DRAW-DOKAR NO-EXTENSION NO INTERVALS

MODIF ID DSP.

*

SELECT-OPTIONS: S_DOKNR FOR DRAW-DOKNR.

SELECT-OPTIONS: S_DOKVR FOR DRAW-DOKVR.

SELECT-OPTIONS: S_DOKTL FOR DRAW-DOKTL.

SELECT-OPTIONS: S_DOKST FOR DRAW-DOKST NO-EXTENSION NO INTERVALS.

*

DATA: BEGIN OF HEADER OCCURS 0,

DOKNR LIKE DRAW-DOKNR,

DOKAR LIKE DRAW-DOKAR,

DOKVR LIKE DRAW-DOKVR,

DOKTL LIKE DRAW-DOKTL,

DKTXT LIKE DRAT-DKTXT,

DOKST LIKE DRAW-DOKST,

DOSTX LIKE TDWST-DOSTX,

DWNAM LIKE DRAW-DWNAM,

FILEP LIKE DRAW-FILEP,

FILEP1 LIKE DRAW-FILEP1,

END OF HEADER.

...

SELECT * FROM DRAW WHERE DOKAR IN S_DOKAR

AND DOKNR IN S_DOKNR

AND DOKVR IN S_DOKVR

AND DOKTL IN S_DOKTL

AND DOKST IN S_DOKST.

Regards, Dieter

Read only

Former Member
0 Likes
1,612

HI Dieter,

PLS CAN YOU SEND YOUR MAILID.

I NEED A HELP FROM YOU REGARDING DMS.

TO ENABLE DOCUMENTS IN THE DMS TO BE EXPORT TO NETWORK DRIVE, IT MEANS LIKE C,D,E & F DRIVE IN COMPUTER.

PLS IF YOU SEND REALLY APPRETIATE.I'LL SEND DETAILS TO YOU.

THANKS ,

MUTHU.

Read only

0 Likes
1,612

Hi raj,

i think its better you post your answer in the SND forum.

SDN is an open forum where i get and put Information.

When i give information they will be for all SDN-User,

because i'm getting Information from other users too.

Sorry.

regards, Dieter

Read only

Former Member
0 Likes
1,612

HI Dieter

MY MAILID IS :jdwill_cud@yahoo.co.in

b'cas i couldn't post that in sdn.if you can pls send my mailid which i've given,

thanks,

raj

Read only

Former Member
0 Likes
1,612

HI Dieter

MY MAILID IS :jdwill_cud@yahoo.co.in

b'cas i couldn't post that in sdn.if you can pls send IN my mailid which i've given,

PLS IF YOU SEND REALLY APPRETIATE.

thanks,

raj

Read only

Former Member
0 Likes
1,612

HI EXPERTS,

please ANYONE CAN ME TO WRITE SELECT STATEMENT,

SELECT INT0 INTERNAL TABLE,

Full Key(DOKAR,DOKNR,DOKVR,DOKTL) from DRAW where DOKST(STATUS) = ANY OF THE STATUS IN THE SELECTION SCREEN and ADATUM= EITHER THE SELECTION DATE 0R TODAY'D DATE DEPENDING ON THE SELECTION SCREEN ENTRIES.

if anyone help me really appretiate.

thanks in advance,

raj

Read only

Former Member
0 Likes
1,613

Hi Rai,

try this:

TABLES: DRAW.

*

SELECT-OPTIONS: S_DOKST FOR DRAW-DOKST.

SELECT-OPTIONS: S_ADATUM FOR DRAW-ADATUM.

PARAMETERS: P_TODAY AS CHECKBOX.

*

DATA: BEGIN OF IDRAW OCCURS 0,

DOKAR LIKE DRAW-DOKAR,

DOKNR LIKE DRAW-DOKNR,

DOKVR LIKE DRAW-DOKVR,

DOKTL LIKE DRAW-DOKTL,

END OF IDRAW.

*

START-OF-SELECTION.

*

IF P_TODAY = 'X'.

CLEAR: S_ADATUM.

REFRESH: S_ADATUM.

S_ADATUM-SIGN = 'I'.

S_ADATUM-OPTION = 'EQ'.

S_ADATUM-LOW = SY-DATUM.

APPEND S_ADATUM.

ENDIF.

SELECT * FROM DRAW WHERE DOKST IN S_DOKST

AND ADATUM IN S_ADATUM.

*

MOVE-CORRESPONDING DRAW TO IDRAW.

APPEND IDRAW.

*

ENDSELECT.

END-OF-SELECTION.

Regards Dieter

Read only

Former Member
0 Likes
1,612

HI DIETER,

THANKS FOR THAT.

I NEED ONE MORE HELP.

The spreadsheet contains the following fields,

DOCUMENT NUMBER,DOCUMENT PART,DOCUMENT VERSION,DOCUMENT TYPE,SHORT DESCRIPTION,DOCUMENT CATEGARY

RESPONSIBLE DEPARTMENT

RESPONSIBLE AREA

LEGACY DOCUMENT NUMBER(ONLY PRESENT ON MIGRATED DOCUMENTS)

PLANT NUMBERS(COMMA SEPARATED STRING WILL BE OK)

PRODUCT CODES (COMMA SEPARATED STRING WILL BE OK).

use the function module "BAPI_DOCUMENT_GETDETAIL2" to determine all the other data such as the following classification value,

DOCUMENT CATEGARY

RESPONSIBLE DEPARTMENT

RESPONSIBLE AREA

LEGACY DOCUMENT NUMBER(ONLY PRESENT ON MIGRATED DOCUMENTS)

PLANT NUMBERS(COMMA SEPARATED STRING WILL BE OK)

PRODUCT CODES (COMMA SEPARATED STRING WILL BE OK).

what are all the classification values i have to in the below FM, pls if you give me the details it#s more helpful.

CALL FUNCTION 'BAPI_DOCUMENT_GETDETAIL2'

EXPORTING

DOCUMENTTYPE =

DOCUMENTNUMBER =

DOCUMENTPART =

DOCUMENTVERSION =

  • GETOBJECTLINKS = ' '

  • GETCOMPONENTS = ' '

  • GETSTATUSLOG = ' '

  • GETLONGTEXTS = ' '

  • GETACTIVEFILES = 'X'

  • GETDOCDESCRIPTIONS = 'X'

  • GETDOCFILES = 'X'

  • GETCLASSIFICATION = ' '

  • GETSTRUCTURE = ' '

  • GETWHEREUSED = ' '

  • HOSTNAME = ' '

  • IMPORTING

  • DOCUMENTDATA =

  • RETURN =

  • TABLES

  • OBJECTLINKS =

  • DOCUMENTDESCRIPTIONS =

  • LONGTEXTS =

  • STATUSLOG =

  • DOCUMENTFILES =

  • COMPONENTS =

  • CHARACTERISTICVALUES =

  • CLASSALLOCATIONS =

  • DOCUMENTSTRUCTURE =

  • WHEREUSEDLIST =