After installing ides, I found that there was no data in the spfli table. Baidu gave me a piece of code. After running the code, spfli had data. The Code is as follows:
* & --------------------------------------------------------------------- ** & Report zliu_008 * & www.qiqubaike.com * & --------------------------------------------------------------------- ** & generate test data for the spfli table * & --------------------------------------------------------------------- * Report zliu_008.data: Begin of et_spfli occurs 0. include structure spfli. data: End of et_spfli.data: Begin of et_sflight occurs 0. include structure sflight. data: End of et_sflight.delete from spfli. * write:/'delete records: ', SY-DBCNT.DELETE from sflight. * write:/'delete records: ', SY-DBCNT.CLEAR sy-SUBRC.CALL function 'bcalv _ weight' exporting placement = 100 rows = 100 tables et_spfli = et_spfli et_sflight = descrispfli from Table et_spfli accepting duplicate keys. * write:/'inser T records: ', SY-DBCNT.IF sy-subrc = '0'. Write:/' the table spfli has successfully generated data. '. Else. Write:/' congratulations, The spfli table has not been converted into data. '. Endif. clear sy-SUBRC.INSERT sflight from Table et_sflight accepting duplicate keys. * write:/'insert records: ', SY-DBCNT.IF sy-subrc = '0 '. write:/'table sflight has successfully generated data. '. Else. Write:/' congratulations, the table sfligh does not generate data. '. Endif. clear sy-subrc. * Data scarr_wa type Scarr. ** scarr_wa-carrid = 'ff '. * scarr_wa-carrname = 'funny flyers '. * scarr_wa-currcode = 'eur '. * scarr_wa-url = 'HTTP: // www.funnyfly.com '. ** insert into Scarr values scarr_wa.data: Begin of my_data, mandt like SCARR-MANDT, "WB training data model bc_travel group carrid like SCARR-CARRID," route carrier ID carrname like SCARR-CARRNAME, "Flight name currcode like SCARR-CURRCODE," flight's local currency URL Like SCARR-URL, "airline URL end of my_data.data: it_data like my_data occurs 0. Delete from Scarr. * write:/'delete records: ', SY-DBCNT.SELECT alv_t_t2 ~ Mandt alv_t_t2 ~ Carrid alv_t_t2 ~ Airpto alv_t_t2 ~ Currency as currcodeinto corresponding fields of table it_data from alv_t_t2.insert Scarr from Table it_data accepting duplicate keys. * write:/'insert records: ', SY-DBCNT.IF sy-subrc = '0 '. write:/'the table Scarr has successfully generated data. '. Else. Write:/' congratulations, the table Scarr is not successful. '. Endif. Clear sy-SUBRC.SKIP 5. Write:/' please go to the table spfli, sflight, Scarr to see, sometimes spfli has data will also prompt not updated. Failed (too many) then '. skip 3. write :/'(()__(()'. write :/'/\'. write :/'(/\\'. write:/'\ o /'. write :/'(_()_)__/\'. write:/'/_, =. ____\'. write:/'(| -- | )'. write :/'/\_. |__ | --__/\_'. write :/'/(/\'. write :/'\\(/'. write :/')\______)/'. write :/'(((____. --(((____/'. write:/sy-uline.