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

Report Help

Former Member
0 Likes
555

Hi all,

I am new to ABAP and i need some help with a report i have to create if possible. I have to obtain Printing documents (OPBEL) from table ERDK and client partner, i have to save this documents in a dictionary table with the next date:

Printing document: ERDK-OPBEL

number of printing copies: Check if there are records in the table for that printing document, if there are i have to obtain the highest number and add 1 to it, if there are none i have to assign the value 1.

Receipt class: i dont have to inform it

Interlocutor: ERDK-PARTNER

Creation Date. sy-datum

Re printing date: i dont ahve to inform it

User: sy-uname

Sorry about the wierd translations but the tables are edited in spanish.

I need some help doing this, cause i dont know how to update the dictionary table with the information i obtain, i cant use work areas , instead i should use field symbols, and i shouldnt use "into corresponding fields of" but i did at some point.

I am going to post the code i have some far, any code help i can get would be amazing in order to finish the report.

Thanks

3 REPLIES 3
Read only

Former Member
0 Likes
505

I forgot to post the code, here it is:

Moderator message - Please respect the 2,500 character maximum when posting. Post only the relevant portions of code. There was no need to include all the comments.

FORM F_UPDATE TABLE USING

  • I AM LOST HERE UPDATING THE TABLE, CAUSE I HAVE TO CHECK IF THE OPBEL I AM ADDING IS IN THE TABLE ALREADY IN ORDER TO UPDATE THE NUMBER OF COPIES, BUT IF THERE IS NO RECORD OF THAT OPBEL I AHVE TO APPEND IT.

ENDFORM.

And please do not use all caps.

Edited by: Rob Burbank on Mar 21, 2010 6:29 PM

Read only

0 Likes
505

Sorry, i will repost the code as i posted comments within it.

TABLES: ERDK,
        ZBIREIMP_FACT.

SELECT-OPTIONS: s_opbel  FOR ERDK-OPBEL,   "Documento de impresión
                s_partne FOR ERDK-PARTNER. "Interlocutor comercial

DATA: i_zbireimp_fact LIKE STANDARD TABLE OF ZBIREIMP_FACT.

FIELD-SYMBOLS: <fs_zbireimp> TYPE ZBIREIMP_FACT.


START-OF-SELECTION.

  PERFORM F_CLEAR_TABLES.

  PERFORM F_GET_DATA.

END-OF-SELECTION.

FORM F_CLEAR_TABLES.

  REFRESH: I_ZBIREIMP_FACT.

ENDFORM.                    " F_CLEAR_TABLES


FORM F_GET_DATA.

  SELECT  OPBEL
          PARTNER
    FROM  ERDK
    INTO CORRESPONDING FIELDS OF TABLE i_zbireimp_fact
    WHERE OPBEL   EQ s_opbel
      AND PARTNER EQ s_partne.

  IF SY-SUBRC EQ 0.

    PERFORM f_actualizar_tabla.
    
  ELSE.

  ENDIF.

ENDFORM.


FORM F_ACTUALIZAR_TABLA

THIS is where i need more help :P

ENDFORM.

Moderator message - Please use code tags to format your code

Edited by: Rob Burbank on Mar 21, 2010 6:52 PM

Read only

praveen_hannu
Contributor
0 Likes
505

Hi

Use Modify statement, it acts both like; update if the entry already exists comparing on the key fields. Append if entry is not exists in the data dictonary;

 modify <dtab> from table <itab> 

Regards

Praveen