Hilfe ich komme einfach nicht weiter

Getting started ... Alles für einen gelungenen Start.
4 Beiträge • Seite 1 von 1
4 Beiträge Seite 1 von 1

Hilfe ich komme einfach nicht weiter

Beitrag von anki_86 (ForumUser / 15 / 0 / 0 ) »

Code: Alles auswählen.

TYPES: BEGIN OF l_ordertab,
*              locid TYPE /tab1/locid,
*              matid TYPE /tab1/matid,
              matnr TYPE /tab1/v_matloc-matnr,
              locno TYPE /tab1/v_matloc-locno,
             orderid TYPE /tab1/ORDERID,
              cat TYPE /tab1/ATPCAT,
              locfr TYPE /tab1/LOCID,
              locto TYPE /tab1/LOCID,

       END OF l_ordertab.

TYPES: BEGIN OF l_eorder,
*              locid TYPE /tab1/locid,
*              matid TYPE /tab1/matid,
             matnr TYPE /tab1/v_matloc-matnr,
              locno TYPE /tab1/v_matloc-locno,
             orderid TYPE /tab1/ORDERID,
              cat TYPE /tab1/ATPCAT,
              locfr TYPE /tab1/LOCID,
              locto TYPE /tab1/LOCID,
       END OF l_eorder.
* Tabellen
DATA: lt_matloc TYPE /tab1/v_matloc OCCURS 0,
     wa_matloc TYPE /tab1/v_matloc,
      lt_eorder TYPE STANDARD TABLE OF l_eorder ,
      wa_eorder TYPE l_eorder.

* Variablen
DATA: locno TYPE /tab1/loc-locno,
      matnr TYPE /tab1/matnr,
      datefr TYPE /tab1/SNPTSTMP,
      dateto TYPE /tab1/SNPTSTMP.


DATA: lt_ordertab TYPE STANDARD TABLE OF l_ordertab,
      wa_ordertab TYPE l_ordertab.

DATA: i TYPE l_ordertab,
      itab TYPE l_ordertab,
      x TYPE l_eorder,
      xtab TYPE l_eorder.


* Lokation
SELECTION-SCREEN BEGIN OF BLOCK loc WITH FRAME TITLE text-002.
SELECT-OPTIONS s_locno FOR locno.
SELECT-OPTIONS s_matno FOR matnr.
PARAMETERS: s_datefr LIKE datefr.
PARAMETERS: s_dateto LIKE dateto.

SELECTION-SCREEN END OF BLOCK loc.


START-OF-SELECTION.

  SELECT * FROM /tab1/V_MATLOC INTO CORRESPONDING FIELDS OF TABLE lt_matloc WHERE locno in s_locno AND matnr in s_matno.

 LOOP AT lt_matloc into wa_matloc.
    CALL FUNCTION 'Z_READ_ORDER'

    EXPORTING
    I_MATID               = wa_matloc-matnr
    I_LOCID               = wa_matloc-locno
    I_TSTFROM             = datefr
    I_TSTTO               = dateto
*     I_CATGR               =
    I_VERSIO              = '000'
    I_CAT                 = 'EP'
*     I_DET                 = ''
   IMPORTING
     E_ORDER_TAB           = lt_eorder
*     E_ORDKEYS_TAB         =
*     E_ORDERMAP_TAB        =
*   EXCEPTIONS
*     ORDER_NOT_FOUND       = 1
*     OTHERS                = 2
          .
    IF SY-SUBRC <> 0.
* MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
*         WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
    ENDIF.

LOOP AT lt_eorder into lt_ordertab.

move wa_eorder-cat  to wa_ordertab-cat.
move wa_eorder-locfr  to wa_ordertab-locfr.
move wa_eorder-locto  to wa_ordertab-locto.
move wa_matloc-matnr   to wa_ordertab-matnr.
move wa_matlich-locno  to wa_ordertab-locno.

APPEND lt_ordertab from wa_ordertab.

ENDLOOP.
Ich bekomme immer die Fehlermeldung

"LT_ORDERTAB" und der Zeilentyp von "LT_EORDER" sind nicht ineinander konvertiertbar. Woran kann das liegen?

Wie gebe ich die Daten, wenn ich sie denn endlich in der internen Tabelle habe ;) per ALV aus?

Über eure Hilfe würde ich mich freuen.

Gruß Anki

gesponsert
Stellenangebote auf ABAPforum.com schalten
kostenfrei für Ausbildungsberufe und Werksstudenten


Beitrag von SkyHobbit (Specialist / 170 / 0 / 1 ) »
Hallo Anki,

ich bin jetzt nicht der Abap-Held, aber ich hätte an der Stelle

Code: Alles auswählen.

LOOP AT lt_eorder into lt_ordertab. 

move wa_eorder-cat  to wa_ordertab-cat. 
move wa_eorder-locfr  to wa_ordertab-locfr. 
move wa_eorder-locto  to wa_ordertab-locto. 
move wa_matloc-matnr   to wa_ordertab-matnr. 
move wa_matlich-locno  to wa_ordertab-locno. 

APPEND lt_ordertab from wa_ordertab. 

ENDLOOP.
eher erwartet

Code: Alles auswählen.

LOOP AT lt_eorder into wa_eorder. 

move wa_eorder-cat  to wa_ordertab-cat. 
move wa_eorder-locfr  to wa_ordertab-locfr. 
move wa_eorder-locto  to wa_ordertab-locto. 
move wa_matloc-matnr   to wa_ordertab-matnr. 
move wa_matlich-locno  to wa_ordertab-locno. 

APPEND lt_ordertab from wa_ordertab. 

ENDLOOP.
Gruß
Ulf

Beitrag von anki_86 (ForumUser / 15 / 0 / 0 ) »
Danke dadurch sind bereits einige Fehler beseititgt allerdings habe ich jetzt eine neue fehlermeldung

Die interne Tabelle "LT_ORDERTAB" hat keine Kopfzeile - statt "APPEND" LT_ORDERTAB" ist nur "APPEND wa TO LT_ORDERTAB" möglich.

Beitrag von SkyHobbit (Specialist / 170 / 0 / 1 ) »
Ja... da hat 'er' recht :wink: , soweit habe ich gar nicht gelesen. Ich komme auch immer ins Trudeln mit den verschiedenen Formen von INSERT, APPEND, DELETE ...

Also die Zeile
APPEND lt_ordertab FROM wa_ordertab.

ändern in
APPEND wa_ordertab TO lt_ordertab.

Gruß
Ulf

Seite 1 von 1

Vergleichbare Themen

3
Antw.
4488
Views
F4 Hilfe
von bohne » 29.11.2006 13:20 • Verfasst in ABAP® für Anfänger
17
Antw.
17473
Views
ALV: F4-Hilfe
von Margolwes » 19.09.2011 15:32 • Verfasst in ABAP® Core
0
Antw.
2863
Views
Hilfe...
von SAPDIDI2 » 13.07.2007 08:13 • Verfasst in ABAP® Core
0
Antw.
1987
Views
Hilfe für Übungsaufgabe
von Goldwing » 04.01.2011 13:21 • Verfasst in ABAP® für Anfänger
4
Antw.
17199
Views
F4 Hilfe Werteliste
von herr mb » 26.01.2011 10:14 • Verfasst in ABAP® für Anfänger

Über diesen Beitrag


Unterstütze die Community und teile den Beitrag für mehr Leser und Austausch

Aktuelle Forenbeiträge

Ermittlung der Arbeitstage (Mosid)
vor 3 Tagen von Radinator 11 / 45974
LSMW-Problem
vor einer Woche von DeathAndPain gelöst 6 / 3862
SFP (Adobe Forms) QR-Code wird nicht angezeigt
vor einer Woche von Sebastian82 gelöst 4 / 2344

Newsletter Anmeldung

Keine Beiträge verpassen! Wöchentlich versenden wir lesenwerte Beiträge aus unserer Community.
Die letzte Ausgabe findest du hier.
Details zum Versandverfahren und zu Ihren Widerrufsmöglichkeiten findest du in unserer Datenschutzerklärung.

Aktuelle Forenbeiträge

Ermittlung der Arbeitstage (Mosid)
vor 3 Tagen von Radinator 11 / 45974
LSMW-Problem
vor einer Woche von DeathAndPain gelöst 6 / 3862
SFP (Adobe Forms) QR-Code wird nicht angezeigt
vor einer Woche von Sebastian82 gelöst 4 / 2344